diff --git a/src/test/java/com/rultor/EnvTest.java b/src/test/java/com/rultor/EnvTest.java index 73b0f762af..cbf43db451 100644 --- a/src/test/java/com/rultor/EnvTest.java +++ b/src/test/java/com/rultor/EnvTest.java @@ -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); @@ -108,4 +118,17 @@ void readsRevisionFromSettingsXml() { Matchers.not(Matchers.emptyString()) ); } + + @Test + void readsVersionFromSettingsXml() { + this.environment.set( + Env.SETTINGS_XML, + "" + ); + MatcherAssert.assertThat( + "takes the right value of the version, while it's absent in the XML", + Env.read("Rultor-Version"), + Matchers.not(Matchers.emptyString()) + ); + } }