-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Query/Command unit backend tests
RISDEV-0000
- Loading branch information
1 parent
21a81bc
commit ca5f168
Showing
10 changed files
with
203 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
.../de/bund/digitalservice/ris/norms/application/port/input/LoadAmendingLawXmlQueryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package de.bund.digitalservice.ris.norms.application.port.input; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class LoadAmendingLawXmlQueryTest { | ||
|
||
@Test | ||
void canCreateQueryWithEli() { | ||
// Given | ||
final String eli = "someEli"; | ||
|
||
// When | ||
final LoadAmendingLawXmlUseCase.Query query = new LoadAmendingLawXmlUseCase.Query(eli); | ||
|
||
// Then | ||
assertThat(query.eli()).isEqualTo(eli); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...st/java/de/bund/digitalservice/ris/norms/application/port/input/LoadArticleQueryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package de.bund.digitalservice.ris.norms.application.port.input; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class LoadArticleQueryTest { | ||
|
||
@Test | ||
void canCreateQueryWithEliAndEId() { | ||
// Given | ||
final String eli = "someEli"; | ||
final String eId = "someEId"; | ||
|
||
// When | ||
final LoadArticleUseCase.Query query = new LoadArticleUseCase.Query(eli, eId); | ||
|
||
// Then | ||
assertThat(query.eli()).isEqualTo(eli); | ||
assertThat(query.eId()).isEqualTo(eId); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...t/java/de/bund/digitalservice/ris/norms/application/port/input/LoadArticlesQueryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package de.bund.digitalservice.ris.norms.application.port.input; | ||
|
||
import static org.assertj.core.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class LoadArticlesQueryTest { | ||
|
||
@Test | ||
void canCreateQueryWithEli() { | ||
// Given | ||
final String eli = "someEli"; | ||
|
||
// When | ||
final LoadArticlesUseCase.Query query = new LoadArticlesUseCase.Query(eli); | ||
|
||
// Then | ||
assertThat(query.eli()).isEqualTo(eli); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
.../java/de/bund/digitalservice/ris/norms/application/port/input/LoadTargetLawQueryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package de.bund.digitalservice.ris.norms.application.port.input; | ||
|
||
import static org.assertj.core.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class LoadTargetLawQueryTest { | ||
|
||
@Test | ||
void canCreateQueryWithEli() { | ||
// Given | ||
final String eli = "someEli"; | ||
|
||
// When | ||
final LoadTargetLawUseCase.Query query = new LoadTargetLawUseCase.Query(eli); | ||
|
||
// Then | ||
assertThat(query.eli()).isEqualTo(eli); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...va/de/bund/digitalservice/ris/norms/application/port/input/LoadTargetLawXmlQueryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package de.bund.digitalservice.ris.norms.application.port.input; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class LoadTargetLawXmlQueryTest { | ||
|
||
@Test | ||
void canCreateQueryWithEli() { | ||
// Given | ||
final String eli = "someEli"; | ||
|
||
// When | ||
final LoadTargetLawXmlUseCase.Query query = new LoadTargetLawXmlUseCase.Query(eli); | ||
|
||
// Then | ||
assertThat(query.eli()).isEqualTo(eli); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
.../bund/digitalservice/ris/norms/application/port/output/LoadAmendingLawXmlCommandTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package de.bund.digitalservice.ris.norms.application.port.output; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class LoadAmendingLawXmlCommandTest { | ||
|
||
@Test | ||
void canCreateCommandWithEli() { | ||
// Given | ||
final String eli = "someEli"; | ||
|
||
// When | ||
final LoadAmendingLawXmlPort.Command command = new LoadAmendingLawXmlPort.Command(eli); | ||
|
||
// Then | ||
assertThat(command.eli()).isEqualTo(eli); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...java/de/bund/digitalservice/ris/norms/application/port/output/LoadArticleCommandTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package de.bund.digitalservice.ris.norms.application.port.output; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class LoadArticleCommandTest { | ||
|
||
@Test | ||
void canCreateCommandWithEliAndEid() { | ||
// Given | ||
final String eli = "someEli"; | ||
final String eId = "someEId"; | ||
|
||
// When | ||
final LoadArticlePort.Command command = new LoadArticlePort.Command(eli, eId); | ||
|
||
// Then | ||
assertThat(command.eli()).isEqualTo(eli); | ||
assertThat(command.eId()).isEqualTo(eId); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...ava/de/bund/digitalservice/ris/norms/application/port/output/LoadArticlesCommandTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package de.bund.digitalservice.ris.norms.application.port.output; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class LoadArticlesCommandTest { | ||
|
||
@Test | ||
void canCreateCommandWithEli() { | ||
// Given | ||
final String eli = "someEli"; | ||
|
||
// When | ||
final LoadArticlesPort.Command command = new LoadArticlesPort.Command(eli); | ||
|
||
// Then | ||
assertThat(command.eli()).isEqualTo(eli); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...va/de/bund/digitalservice/ris/norms/application/port/output/LoadTargetLawCommandTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package de.bund.digitalservice.ris.norms.application.port.output; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class LoadTargetLawCommandTest { | ||
|
||
@Test | ||
void canCreateCommandWithEli() { | ||
// Given | ||
final String eli = "someEli"; | ||
// When | ||
final LoadTargetLawPort.Command command = new LoadTargetLawPort.Command(eli); | ||
|
||
// Then | ||
assertThat(command.eli()).isEqualTo(eli); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...de/bund/digitalservice/ris/norms/application/port/output/LoadTargetLawXmlCommandTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package de.bund.digitalservice.ris.norms.application.port.output; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class LoadTargetLawXmlCommandTest { | ||
|
||
@Test | ||
void canCreateCommandWithEli() { | ||
// Given | ||
final String eli = "someEli"; | ||
|
||
// When | ||
final LoadTargetLawPort.Command command = new LoadTargetLawPort.Command(eli); | ||
|
||
// Then | ||
assertThat(command.eli()).isEqualTo(eli); | ||
} | ||
} |