File tree 1 file changed +60
-0
lines changed
internal-api/src/test/groovy/datadog/trace/api
1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ package datadog.trace.api
2
+
3
+ import datadog.trace.test.util.DDSpecification
4
+
5
+ class ProductTsTest extends DDSpecification {
6
+
7
+ void ' test updateProduct' (){
8
+ when :
9
+ final result = ProductTs . updateProduct(init, newProduct)
10
+
11
+ then :
12
+ result == expected
13
+
14
+ where :
15
+ init | newProduct | expected
16
+ 0 | ProductTs . ASM | ProductTs . ASM
17
+ ProductTs . ASM | ProductTs . DSM | 6
18
+ }
19
+
20
+ void ' test isProductMarked' (){
21
+ when :
22
+ final result = ProductTs . isProductMarked(value, product)
23
+
24
+ then :
25
+ result == expected
26
+
27
+ where :
28
+ value | product | expected
29
+ ProductTs . ASM | ProductTs . ASM | true
30
+ ProductTs . DSM | ProductTs . ASM | false
31
+ }
32
+
33
+ void ' test getBitfieldHex' (){
34
+ when :
35
+ final result = ProductTs . getBitfieldHex(value)
36
+
37
+ then :
38
+ result == expected
39
+
40
+ where :
41
+ value | expected
42
+ 0 | " 00"
43
+ ProductTs . ASM | " 02"
44
+ }
45
+
46
+ void ' test parseBitfieldHex' (){
47
+ when :
48
+ final result = ProductTs . parseBitfieldHex(hex)
49
+
50
+ then :
51
+ result == expected
52
+
53
+ where :
54
+ hex | expected
55
+ " 00" | 0
56
+ null | 0
57
+ " " | 0
58
+ " 02" | ProductTs . ASM
59
+ }
60
+ }
You can’t perform that action at this time.
0 commit comments