Skip to content

Commit

Permalink
Update mock data generator to support StixBoolean
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenOTT committed May 8, 2019
1 parent c1b6422 commit 17fbd3d
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/test/groovy/faker/StixMockDataGenerator.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package faker

import faker.configs.ObservedDataGeneratorConfig
import io.digitalstate.stix.bundle.Bundle
import io.digitalstate.stix.common.StixBoolean
import io.digitalstate.stix.common.StixInstant
import io.digitalstate.stix.coo.extension.types.*
import io.digitalstate.stix.coo.objects.*
Expand Down Expand Up @@ -182,7 +183,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(50).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(50).get()) {
Expand Down Expand Up @@ -258,7 +259,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(50).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(50).get()) {
Expand Down Expand Up @@ -321,7 +322,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(50).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(50).get()) {
Expand Down Expand Up @@ -390,7 +391,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(50).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(50).get()) {
Expand Down Expand Up @@ -457,7 +458,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(50).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(50).get()) {
Expand Down Expand Up @@ -542,7 +543,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(50).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(50).get()) {
Expand Down Expand Up @@ -600,7 +601,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(50).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(50).get()) {
Expand Down Expand Up @@ -762,7 +763,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(config.propRevokedProbability).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(config.propCustomPropsProbability).get()) {
Expand Down Expand Up @@ -1666,7 +1667,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(50).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(50).get()) {
Expand Down Expand Up @@ -1762,7 +1763,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(50).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(50).get()) {
Expand Down Expand Up @@ -1828,7 +1829,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(50).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(50).get()) {
Expand Down Expand Up @@ -1882,7 +1883,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(50).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(50).get()) {
Expand Down Expand Up @@ -2309,7 +2310,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(50).get()) {
builder.revoked(true)
builder.revoked(new StixBoolean(true))
}

if (mock.bools().probability(50).get()) {
Expand Down Expand Up @@ -2375,7 +2376,7 @@ public class StixMockDataGenerator {
}

if (mock.bools().probability(20).get()) {
builder.isSummary(true)
builder.isSummary(new StixBoolean(true))
}

return builder.build()
Expand Down

0 comments on commit 17fbd3d

Please sign in to comment.