1
- package stix_test
1
+ package comparison_test
2
2
3
3
import (
4
4
"errors"
5
5
"soarca/models/cacao"
6
- "soarca/utils/stix"
6
+ "soarca/utils/stix/expression/comparison "
7
7
"testing"
8
8
9
9
"github.com/go-playground/assert/v2"
10
10
)
11
11
12
12
func TestStringEquals (t * testing.T ) {
13
13
14
- stix := stix .New ()
14
+ stix := comparison .New ()
15
15
16
16
var1 := cacao.Variable {Type : cacao .VariableTypeString }
17
17
var1 .Value = "a"
@@ -55,7 +55,7 @@ func TestStringEquals(t *testing.T) {
55
55
}
56
56
57
57
func TestIntEquals (t * testing.T ) {
58
- stix := stix .New ()
58
+ stix := comparison .New ()
59
59
60
60
var1 := cacao.Variable {Type : cacao .VariableTypeLong }
61
61
var1 .Value = "1000"
@@ -102,7 +102,7 @@ func TestIntEquals(t *testing.T) {
102
102
}
103
103
104
104
func TestFloatEquals (t * testing.T ) {
105
- stix := stix .New ()
105
+ stix := comparison .New ()
106
106
107
107
var1 := cacao.Variable {Type : cacao .VariableTypeFloat }
108
108
var1 .Value = "1000.0"
@@ -158,7 +158,7 @@ func TestFloatEquals(t *testing.T) {
158
158
}
159
159
160
160
func TestIp4AddressEquals (t * testing.T ) {
161
- stix := stix .New ()
161
+ stix := comparison .New ()
162
162
var1 := cacao.Variable {Type : cacao .VariableTypeIpv4Address }
163
163
var1 .Value = "10.0.0.30"
164
164
var1 .Name = "__var1__"
@@ -182,7 +182,7 @@ func TestIp4AddressEquals(t *testing.T) {
182
182
}
183
183
184
184
func TestIp6AddressEquals (t * testing.T ) {
185
- stix := stix .New ()
185
+ stix := comparison .New ()
186
186
var1 := cacao.Variable {Type : cacao .VariableTypeIpv6Address }
187
187
var1 .Value = "2001:db8::1"
188
188
var1 .Name = "__var1__"
@@ -206,7 +206,7 @@ func TestIp6AddressEquals(t *testing.T) {
206
206
}
207
207
208
208
func TestMacAddressEquals (t * testing.T ) {
209
- stix := stix .New ()
209
+ stix := comparison .New ()
210
210
var1 := cacao.Variable {Type : cacao .VariableTypeMacAddress }
211
211
var1 .Value = "BC-24-11-00-00-01"
212
212
var1 .Name = "__var1__"
@@ -240,7 +240,7 @@ func TestMacAddressEquals(t *testing.T) {
240
240
}
241
241
242
242
func TestHashEquals (t * testing.T ) {
243
- stix := stix .New ()
243
+ stix := comparison .New ()
244
244
md5 := cacao.Variable {Type : cacao .VariableTypeMd5Has }
245
245
md5 .Value = "d41d8cd98f00b204e9800998ecf8427e"
246
246
md5 .Name = "__md5__"
@@ -294,7 +294,7 @@ func TestHashEquals(t *testing.T) {
294
294
}
295
295
296
296
func TestUriEquals (t * testing.T ) {
297
- stix := stix .New ()
297
+ stix := comparison .New ()
298
298
299
299
var1 := cacao.Variable {Type : cacao .VariableTypeUri }
300
300
var1 .Value = "https://google.com"
@@ -316,7 +316,7 @@ func TestUriEquals(t *testing.T) {
316
316
}
317
317
318
318
func TestUuidEquals (t * testing.T ) {
319
- stix := stix .New ()
319
+ stix := comparison .New ()
320
320
321
321
var1 := cacao.Variable {Type : cacao .VariableTypeUuid }
322
322
var1 .Value = "ec887691-9a21-4ccf-8fae-360c13a819d1"
0 commit comments