Skip to content

Commit

Permalink
610: unit test ourStatusFromReportStreamStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
halprin committed Jan 15, 2024
1 parent 2a05973 commit 7cdd122
Showing 1 changed file with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,4 +427,40 @@ class PartnerMetadataOrchestratorTest extends Specification {
then:
thrown(FormatterProcessingException)
}

def "ourStatusFromReportStreamStatus returns FAILED"() {
when:
def ourStatus = PartnerMetadataOrchestrator.getInstance().ourStatusFromReportStreamStatus("Error")

then:
ourStatus == PartnerMetadataStatus.FAILED

when:
ourStatus = PartnerMetadataOrchestrator.getInstance().ourStatusFromReportStreamStatus("Not Delivering")

then:
ourStatus == PartnerMetadataStatus.FAILED
}

def "ourStatusFromReportStreamStatus returns DELIVERED"() {
when:
def ourStatus = PartnerMetadataOrchestrator.getInstance().ourStatusFromReportStreamStatus("Delivered")

then:
ourStatus == PartnerMetadataStatus.DELIVERED
}

def "ourStatusFromReportStreamStatus returns PENDING"() {
when:
def ourStatus = PartnerMetadataOrchestrator.getInstance().ourStatusFromReportStreamStatus("Waiting to Deliver")

then:
ourStatus == PartnerMetadataStatus.PENDING

when:
ourStatus = PartnerMetadataOrchestrator.getInstance().ourStatusFromReportStreamStatus("DogCow")

then:
ourStatus == PartnerMetadataStatus.PENDING
}
}

0 comments on commit 7cdd122

Please sign in to comment.