Skip to content

Commit

Permalink
Use getFirst method
Browse files Browse the repository at this point in the history
  • Loading branch information
mnhock committed Apr 3, 2024
1 parent 8cec124 commit 59c98bd
Showing 1 changed file with 53 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,81 +39,84 @@ void shouldDeserializeValidModel() throws DeserializerException {
() -> assertEquals("Company projects at a glance", bom.organization().description()),

() -> assertEquals(2, bom.environments().all().size()),
() -> assertEquals("Staging", bom.environments().all().get(0).name()),
() -> assertEquals("Staging description", bom.environments().all().get(0).description()),
() -> assertEquals("staging.naikan.io", bom.environments().all().get(0).location()),
() -> assertEquals(1, bom.environments().all().get(0).tags().all().size()),
() -> assertEquals("Staging", bom.environments().all().get(0).tags().all().get(0)),
() -> assertEquals("Staging", bom.environments().all().getFirst().name()),
() -> assertEquals("Staging description",
bom.environments().all().getFirst().description()),
() -> assertEquals("staging.naikan.io", bom.environments().all().getFirst().location()),
() -> assertEquals(1, bom.environments().all().getFirst().tags().all().size()),
() -> assertEquals("Staging", bom.environments().all().getFirst().tags().all().getFirst()),
() -> assertEquals("Production", bom.environments().all().get(1).name()),
() -> assertEquals("Production description", bom.environments().all().get(1).description()),
() -> assertEquals("naikan.io", bom.environments().all().get(1).location()),
() -> assertEquals(0, bom.environments().all().get(1).tags().all().size()),

() -> assertEquals(1, bom.teams().all().size()),
() -> assertEquals("Naikan Team", bom.teams().all().get(0).name()),
() -> assertEquals("Naikan Core Team", bom.teams().all().get(0).description()),
() -> assertEquals("Naikan Team", bom.teams().all().getFirst().name()),
() -> assertEquals("Naikan Core Team", bom.teams().all().getFirst().description()),

() -> assertEquals(1, bom.developers().all().size()),
() -> assertEquals("Trev Cooksey", bom.developers().all().get(0).name()),
() -> assertEquals("cytrev", bom.developers().all().get(0).username()),
() -> assertEquals("Principal Software Engineer", bom.developers().all().get(0).title()),
() -> assertEquals("Trev Cooksey", bom.developers().all().getFirst().name()),
() -> assertEquals("cytrev", bom.developers().all().getFirst().username()),
() -> assertEquals("Principal Software Engineer",
bom.developers().all().getFirst().title()),
() -> assertEquals("Naikan Software Engineering",
bom.developers().all().get(0).department()),
() -> assertEquals("tcooksey1@geocities.jp", bom.developers().all().get(0).email()),
() -> assertEquals("1212-12-90999", bom.developers().all().get(0).phone()),
() -> assertEquals("Edgetag", bom.developers().all().get(0).organization()),
bom.developers().all().getFirst().department()),
() -> assertEquals("tcooksey1@geocities.jp", bom.developers().all().getFirst().email()),
() -> assertEquals("1212-12-90999", bom.developers().all().getFirst().phone()),
() -> assertEquals("Edgetag", bom.developers().all().getFirst().organization()),
() -> assertEquals("https://www.edgetag.tech",
bom.developers().all().get(0).organizationUrl()),
() -> assertEquals("America/New_York", bom.developers().all().get(0).timezone()),
() -> assertEquals("Best developer!", bom.developers().all().get(0).description()),
() -> assertEquals(2, bom.developers().all().get(0).roles().all().size()),
() -> assertEquals("architect", bom.developers().all().get(0).roles().all().get(0)),
() -> assertEquals("developer", bom.developers().all().get(0).roles().all().get(1)),
bom.developers().all().getFirst().organizationUrl()),
() -> assertEquals("America/New_York", bom.developers().all().getFirst().timezone()),
() -> assertEquals("Best developer!", bom.developers().all().getFirst().description()),
() -> assertEquals(2, bom.developers().all().getFirst().roles().all().size()),
() -> assertEquals("architect", bom.developers().all().getFirst().roles().all().getFirst()),
() -> assertEquals("developer", bom.developers().all().getFirst().roles().all().get(1)),

() -> assertEquals(1, bom.contacts().all().size()),
() -> assertEquals("John Doe", bom.contacts().all().get(0).name()),
() -> assertEquals("Product Owner", bom.contacts().all().get(0).title()),
() -> assertEquals("jdoe@example.com", bom.contacts().all().get(0).email()),
() -> assertEquals("461-355-2912", bom.contacts().all().get(0).phone()),
() -> assertEquals("John Doe", bom.contacts().all().getFirst().name()),
() -> assertEquals("Product Owner", bom.contacts().all().getFirst().title()),
() -> assertEquals("jdoe@example.com", bom.contacts().all().getFirst().email()),
() -> assertEquals("461-355-2912", bom.contacts().all().getFirst().phone()),
() -> assertEquals("Responsible for this project",
bom.contacts().all().get(0).description()),
() -> assertEquals("PO", bom.contacts().all().get(0).roles().all().get(0)),
bom.contacts().all().getFirst().description()),
() -> assertEquals("PO", bom.contacts().all().getFirst().roles().all().getFirst()),

() -> assertEquals(2, bom.technologies().all().size()),
() -> assertEquals("Java", bom.technologies().all().get(0).name()),
() -> assertEquals("19", bom.technologies().all().get(0).version()),
() -> assertEquals(1, bom.technologies().all().get(0).tags().all().size()),
() -> assertEquals("backend", bom.technologies().all().get(0).tags().all().get(0)),
() -> assertEquals("Java", bom.technologies().all().getFirst().name()),
() -> assertEquals("19", bom.technologies().all().getFirst().version()),
() -> assertEquals(1, bom.technologies().all().getFirst().tags().all().size()),
() -> assertEquals("backend", bom.technologies().all().getFirst().tags().all().getFirst()),
() -> assertEquals("Angular", bom.technologies().all().get(1).name()),
() -> assertEquals("React or Angular", bom.technologies().all().get(1).description()),
() -> assertEquals("15.0", bom.technologies().all().get(1).version()),
() -> assertEquals("Best programming language",
bom.technologies().all().get(0).description()),
bom.technologies().all().getFirst().description()),

() -> assertEquals(1, bom.licenses().all().size()),
() -> assertEquals("Apache-2.0", bom.licenses().all().get(0).name()),
() -> assertEquals("Apache-2.0", bom.licenses().all().getFirst().name()),
() -> assertEquals("https://www.apache.org/licenses/LICENSE-2.0.txt",
bom.licenses().all().get(0).url()),
() -> assertEquals("Or MIT license?", bom.licenses().all().get(0).description()),
bom.licenses().all().getFirst().url()),
() -> assertEquals("Or MIT license?", bom.licenses().all().getFirst().description()),

() -> assertEquals(2, bom.documentations().all().size()),
() -> assertEquals("Architecture overview", bom.documentations().all().get(0).name()),
() -> assertEquals("naikan.io/arch24", bom.documentations().all().get(0).location()),
() -> assertEquals("ARC24", bom.documentations().all().get(0).description()),
() -> assertEquals(2, bom.documentations().all().get(0).tags().all().size()),
() -> assertEquals("Architecture", bom.documentations().all().get(0).tags().all().get(0)),
() -> assertEquals("ARC24", bom.documentations().all().get(0).tags().all().get(1)),
() -> assertEquals("Architecture overview", bom.documentations().all().getFirst().name()),
() -> assertEquals("naikan.io/arch24", bom.documentations().all().getFirst().location()),
() -> assertEquals("ARC24", bom.documentations().all().getFirst().description()),
() -> assertEquals(2, bom.documentations().all().getFirst().tags().all().size()),
() -> assertEquals("Architecture",
bom.documentations().all().getFirst().tags().all().getFirst()),
() -> assertEquals("ARC24", bom.documentations().all().getFirst().tags().all().get(1)),
() -> assertEquals("Technical debt", bom.documentations().all().get(1).name()),
() -> assertEquals("wiki.naikan.io/techdebt", bom.documentations().all().get(1).location()),
() -> assertEquals("Should be reduced!", bom.documentations().all().get(1).description()),

() -> assertEquals(5, bom.integrations().all().size()),
() -> assertEquals("Bitbucket", bom.integrations().all().get(0).name()),
() -> assertEquals("Scm description", bom.integrations().all().get(0).description()),
() -> assertEquals("Bitbucket", bom.integrations().all().getFirst().name()),
() -> assertEquals("Scm description", bom.integrations().all().getFirst().description()),
() -> assertEquals("http://127.0.0.1/bitbucket/naikan",
bom.integrations().all().get(0).url()),
() -> assertEquals(1, bom.integrations().all().get(0).tags().all().size()),
() -> assertEquals("Scm", bom.integrations().all().get(0).tags().all().get(0)),
bom.integrations().all().getFirst().url()),
() -> assertEquals(1, bom.integrations().all().getFirst().tags().all().size()),
() -> assertEquals("Scm", bom.integrations().all().getFirst().tags().all().getFirst()),
() -> assertEquals("Bamboo", bom.integrations().all().get(1).name()),
() -> assertEquals("Ci description", bom.integrations().all().get(1).description()),
() -> assertEquals("http://127.0.0.1:8080/bamboo/naikan",
Expand All @@ -129,15 +132,15 @@ void shouldDeserializeValidModel() throws DeserializerException {
() -> assertEquals("http://127.0.0.1/dtrack/naikan", bom.integrations().all().get(4).url()),

() -> assertEquals(2, bom.tags().all().size()),
() -> assertEquals("web", bom.tags().all().get(0)),
() -> assertEquals("web", bom.tags().all().getFirst()),
() -> assertEquals("intern", bom.tags().all().get(1)),

() -> assertEquals(2, bom.deployments().all().size()),
() -> assertEquals("Staging", bom.deployments().all().get(0).environment()),
() -> assertEquals("staging.naikan.io", bom.deployments().all().get(0).location()),
() -> assertEquals("1.0.0", bom.deployments().all().get(0).version()),
() -> assertEquals("Staging", bom.deployments().all().getFirst().environment()),
() -> assertEquals("staging.naikan.io", bom.deployments().all().getFirst().location()),
() -> assertEquals("1.0.0", bom.deployments().all().getFirst().version()),
() -> assertEquals(LocalDateTime.parse("2022-12-28T08:29:10.079226"),
bom.deployments().all().get(0).timestamp()),
bom.deployments().all().getFirst().timestamp()),

() -> assertEquals("naikan", bom.repository().name()),
() -> assertEquals("git@github.com:enofex/naikan.git", bom.repository().url()),
Expand Down

0 comments on commit 59c98bd

Please sign in to comment.