Passed
Push — main ( 1d4b72...0c6738 )
by Acho
01:55
created

afrikpay.TestPointerToString   A

Complexity

Conditions 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
dl 0
loc 9
rs 10
c 0
b 0
f 0
nop 1
1
package afrikpay
2
3
import (
4
	"testing"
5
6
	"github.com/stretchr/testify/assert"
7
)
8
9
func TestPointerToString(t *testing.T) {
10
	// Arrange
11
	input := "test-input"
12
13
	// Act
14
	inputString := PointerToString(&input)
15
16
	// Assert
17
	assert.Equal(t, input, inputString)
18
}
19
20
func TestStringToPointer(t *testing.T) {
21
	// Arrange
22
	input := "test-input"
23
24
	// Act
25
	inputPtr := StringToPointer(input)
26
27
	// Assert
28
	assert.Equal(t, &input, inputPtr)
29
}
30