@@ -3,7 +3,6 @@ package matching
3
3
import (
4
4
"testing"
5
5
6
- "github.com/SpectoLabs/hoverfly/core/state"
7
6
. "github.com/onsi/gomega"
8
7
)
9
8
@@ -28,7 +27,7 @@ func Test_StateMatcher_ShouldMatchIfCurrentStateIsNilAndRequiredStateIsEmpty(t *
28
27
func Test_StateMatcher_ShouldMatchIfCurrentStateIEmptyAndRequiredStateIsNil (t * testing.T ) {
29
28
RegisterTestingT (t )
30
29
31
- match := StateMatcher (& state. State { State : make (map [string ]string )} , nil )
30
+ match := StateMatcher (make (map [string ]string ), nil )
32
31
33
32
Expect (match .Matched ).To (BeTrue ())
34
33
Expect (match .Score ).To (Equal (0 ))
@@ -37,7 +36,7 @@ func Test_StateMatcher_ShouldMatchIfCurrentStateIEmptyAndRequiredStateIsNil(t *t
37
36
func Test_StateMatcher_ShouldNotMatchIfRequiredStateLengthIsGreaterThanActualStateLength (t * testing.T ) {
38
37
RegisterTestingT (t )
39
38
40
- match := StateMatcher (& state. State { State : make (map [string ]string )} , map [string ]string {"foo" : "bar" })
39
+ match := StateMatcher (make (map [string ]string ), map [string ]string {"foo" : "bar" })
41
40
42
41
Expect (match .Matched ).To (BeFalse ())
43
42
Expect (match .Score ).To (Equal (0 ))
@@ -47,7 +46,7 @@ func Test_StateMatcher_ShouldNotMatchIfLengthsAreTheSameButKeysAreDifferent(t *t
47
46
RegisterTestingT (t )
48
47
49
48
match := StateMatcher (
50
- & state. State { State : map [string ]string {"foo" : "bar" , "cheese" : "ham" } },
49
+ map [string ]string {"foo" : "bar" , "cheese" : "ham" },
51
50
map [string ]string {"adasd" : "bar" , "sadsad" : "ham" })
52
51
53
52
Expect (match .Matched ).To (BeFalse ())
@@ -58,7 +57,7 @@ func Test_StateMatcher_ShouldNotMatchIfKeysAreTheSameButValuesAreDifferent(t *te
58
57
RegisterTestingT (t )
59
58
60
59
match := StateMatcher (
61
- & state. State { State : map [string ]string {"foo" : "bar" , "cheese" : "ham" } },
60
+ map [string ]string {"foo" : "bar" , "cheese" : "ham" },
62
61
map [string ]string {"foo" : "adsad" , "cheese" : "ham" })
63
62
64
63
Expect (match .Matched ).To (BeFalse ())
@@ -69,7 +68,7 @@ func Test_StateMatcher_ShouldMatchIsKeysAndValuesAreTheSame(t *testing.T) {
69
68
RegisterTestingT (t )
70
69
71
70
match := StateMatcher (
72
- & state. State { State : map [string ]string {"foo" : "bar" , "cheese" : "ham" } },
71
+ map [string ]string {"foo" : "bar" , "cheese" : "ham" },
73
72
map [string ]string {"foo" : "bar" , "cheese" : "ham" })
74
73
75
74
Expect (match .Matched ).To (BeTrue ())
0 commit comments