Commit 8f7a602
authored
Add End to End Unit Testing for JSON De/Serialization (#79)
* update names of mock methods
* fix naming of json annotations for proper updates
* Updates to support proper sequence generation
* add printing of object and json outputs for manual review and update test description
* adds support for IdentitySDO
* add identity SDO testing support
* Add random label generator
* Add support for Campaign SDO
* remove tabs
* Add course of action, intrusion set tests + fixes to related SDOs + cleanup
* add Malware, ObservedData + Artifact + Fix for hashes pluralization
* remove old imports
* Fix misnamed method
* Add Autonomous System COO
* Add DirectoryCOO
* Add Domain Name COO
* Add Email Address COO
* removing inner Set<String> from headers to conform to spec, even though its a issue
The spec dictates this is a "Dictionary" field. But a dictionary cannot have duplicate fields. oasis-tcs/cti-stix2#138
* Add Email Message COO + MimePartType which is used in email message
* Fix bad business rule for email message
* add comment
* fix bad naming of jsonpropertydescription
* Add dupluralizeDictionary values for better method naming
* reorder methods to match the ordering in the spec
* Add support for File Coo
* Cleanup on COO Extension serializer and deserializer for better output
* Remove unneeded Annotations as the MimePartType only exists as a sub object and has not "typing"
* Add Valid annotation to getBodyMultipart so the MimePartTypeObj is validated against the EmailMessage validation
* cleanup + fix file coo issues
* add missing GenericValdiation extends on COO inner types
* Remove valid anotation as it will be handled by the GenericValidation interface of MimePartTypeObj
* convert list mocking to use fromStrings() method provided by mockneat
* remove old code for better Mimes dictionary
* adjust default range for sector generation in identites
* change custom props to generate with prepend
* fix regression with threat actor sdo
* Add IVP4 COO supporte
* Add IPV6 COO support
* Add Mac Address COO + MacAddress generation support on IVP4 and IPV6 COO
* fix types
* Add Mutex and NetworkTraffic COO
* Fix type in method name
* Add Process COO support
* Remove regex until better working pattern can be created
* Add Software COO
* Add URL coo
* fix vocab placement
* Add UserAccount COO and cleanup
* Add user account coo to Observed Object generator
* fix vocab annotation placement
* cleanup todo
* Add Windows Registry Key Coo support
* Fix network traffic annotations for range
* fix regex pattern annotaiton placement
* Cleanup to fix bugs
* Cleanup + Add depluralize dictionary support
* Add X509 cert COO support
* Add TheatActor, Report, Tool, Vulnerability SDO support plus cleanup
* Add alias/aliases dictionary for depluralization of methods
* Fix annotation for vocab on labels
* Fix business rule that was using incorrect methods (isEmpty vs isPresent)
* Add jsonassert
* Update attack pattern with use of objectmapper and json assert
* Update for using ObjectMapper for serialization/deserialization within specs
* cleanup imports
* remove unneeded imports from groovy.json
* Remove unneeded Style annotation
* Add custom properties support onto the Bundle object
* Add mock bundle support
* Remove old tests that are not needed
* remove old json files from tests
* refactor and add readme context for test resources
* refactor mockDatagenerator groovy trait location
* Add custom props support to Marking Objects and Granular Marking Objects
* fix javadoc
* Add Granular Marking, Object Marking, Statement and TLP support + updated all SDOs with CreatedByRef + Updated Report and Bundle to generate Object Markings
* remove markovs are they are way too slow!
* rename method for clearner usage
* Add Markings Definition support + JsontypeName support for TLP and Statement Markings
* refactor vocabularies into clearner packages
* update deps and add missing imports for refactor of vocabs packages
* Add Relationship and Sighting SROs support. Added to Bundle and Report + Add individual Spec tests1 parent d9c98ec commit 8f7a602
File tree
110 files changed
+3230
-977
lines changed- src
- main/java/io/digitalstate/stix
- bundle
- common
- coo
- extension/types
- json
- extension
- observables
- objects
- types
- datamarkings
- json
- sdo
- objects
- types
- sro/objects
- validation/contraints
- hashingvocab
- vocab
- vocabulary
- vocabularies
- test
- groovy/stix
- bundle
- customprops
- datamarkings
- end2end
- helpers
- observables
- sdo
- sro
- resources/stix
- baseline
- json/sdo/threatreport
- json
- bundle
- customprops
- cyberobsrvables
- datamarking
- domainobjects
- relationshipobjects
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
110 files changed
+3230
-977
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
156 | 163 | | |
157 | 164 | | |
158 | 165 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | | - | |
16 | | - | |
17 | 14 | | |
18 | 15 | | |
19 | 16 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
0 commit comments