Skip to content

Commit

Permalink
Formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Aug 2, 2024
1 parent e2c4670 commit 6ff1e80
Showing 1 changed file with 28 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,59 +14,74 @@ class InterventionServiceTest {
@Test
fun `toRecallRejectedOrWithdrawn returns true `() {

val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC05", "REC05")
val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC05", "REC05")
val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus)
assertEquals(true, nsi.toRecallRejectedOrWithdrawn())
}

@Test
fun `toRecallRejectedOrWithdrawn returns false due to no outcome`() {

val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03")
val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = null)
val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03")
val nsi =
SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = null)
assertEquals(false, nsi.toRecallRejectedOrWithdrawn())
}

@Test
fun `toRecallRejectedOrWithdrawn returns null due to other status enum`() {

val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "OTHER", "OTHER")
val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = null)
val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "OTHER", "OTHER")
val nsi =
SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = null)
assertEquals(null, nsi.toRecallRejectedOrWithdrawn())
}

@Test
fun `toRecallRejectedOrWithdrawn returns true due to outcome type enum`() {

val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03")
val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03")
val outcome = ReferenceData("REC02", "REC02", IdGenerator.getAndIncrement())
val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = outcome)
val nsi = SentenceGenerator.generateBreachNsi(
SentenceGenerator.CURRENT_SENTENCE,
status = nsiStatus,
outcome = outcome
)
assertEquals(true, nsi.toRecallRejectedOrWithdrawn())
}

@Test
fun `toOutcome returns null due to null outcome`() {

val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03")
val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = null)
val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03")
val nsi =
SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = null)
assertEquals(null, nsi.toOutcomeRecall())
}

@Test
fun `toOutcome returns false due to outcome type`() {

val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03")
val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03")
val outcome = ReferenceData("REC02", "REC02", IdGenerator.getAndIncrement())
val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = outcome)
val nsi = SentenceGenerator.generateBreachNsi(
SentenceGenerator.CURRENT_SENTENCE,
status = nsiStatus,
outcome = outcome
)
assertEquals(false, nsi.toOutcomeRecall())
}

@Test
fun `toOutcome returns true due to outcome type`() {

val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03")
val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03")
val outcome = ReferenceData("REC03", "REC03", IdGenerator.getAndIncrement())
val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = outcome)
val nsi = SentenceGenerator.generateBreachNsi(
SentenceGenerator.CURRENT_SENTENCE,
status = nsiStatus,
outcome = outcome
)
assertEquals(true, nsi.toOutcomeRecall())
}
}
Expand Down

0 comments on commit 6ff1e80

Please sign in to comment.