Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 24, 2024
1 parent 3d89797 commit 006cf87
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/java/com/rultor/EnvTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ void readsFromManifest() {
);
}

@Test
void readsVersionFromManifest() {
this.environment.remove(Env.SETTINGS_XML);
MatcherAssert.assertThat(
"takes the right value of the version",
Env.read("Rultor-Version"),
Matchers.not(Matchers.emptyString())
);
}

@Test
void readsRevisionFromManifest() {
this.environment.remove(Env.SETTINGS_XML);
Expand Down Expand Up @@ -108,4 +118,17 @@ void readsRevisionFromSettingsXml() {
Matchers.not(Matchers.emptyString())
);
}

@Test
void readsVersionFromSettingsXml() {
this.environment.set(
Env.SETTINGS_XML,
"<settings />"
);
MatcherAssert.assertThat(
"takes the right value of the version, while it's absent in the XML",
Env.read("Rultor-Version"),
Matchers.not(Matchers.emptyString())
);
}
}

0 comments on commit 006cf87

Please sign in to comment.