-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Thierry Boileau <[email protected]>
- Loading branch information
Showing
11 changed files
with
103 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
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
36 changes: 36 additions & 0 deletions
36
org.restlet.gwt/org.restlet.gwt/src/test/java/org/restlet/client/engine/EngineTest.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,36 @@ | ||
/** | ||
* Copyright 2005-2024 Qlik | ||
* | ||
* The contents of this file is subject to the terms of the Apache 2.0 open | ||
* source license available at http://www.opensource.org/licenses/apache-2.0 | ||
* | ||
* Restlet is a registered trademark of QlikTech International AB. | ||
*/ | ||
|
||
package org.restlet.client.engine; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.util.Properties; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class EngineTest { | ||
|
||
@Test | ||
public void engineVersionShouldBeEqualToMavenProjectVersion() { | ||
// When I retrieve the Maven project's version as stated in the pom file. | ||
Properties properties = new Properties(); | ||
try (InputStream resourceAsStream = EngineTest.class.getClassLoader().getResourceAsStream("maven-version.properties")) { | ||
properties.load(resourceAsStream); | ||
} catch (IOException e) { | ||
Assertions.fail("Can't load the properties file that contain the Maven's project version"); | ||
} | ||
|
||
// Then the Maven project's version should be equal to the Engine's version. | ||
assertEquals(Engine.VERSION, properties.getProperty("maven.version")); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
org.restlet.gwt/org.restlet.gwt/src/test/resources/maven-version.properties
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 @@ | ||
maven.version=${project.version} |
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
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
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
36 changes: 36 additions & 0 deletions
36
org.restlet.java/org.restlet/src/test/java/org/restlet/engine/EngineTest.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,36 @@ | ||
/** | ||
* Copyright 2005-2024 Qlik | ||
* | ||
* The contents of this file is subject to the terms of the Apache 2.0 open | ||
* source license available at http://www.opensource.org/licenses/apache-2.0 | ||
* | ||
* Restlet is a registered trademark of QlikTech International AB. | ||
*/ | ||
|
||
package org.restlet.engine; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.util.Properties; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class EngineTest { | ||
|
||
@Test | ||
public void engineVersionShouldBeEqualToMavenProjectVersion() { | ||
// When I retrieve the Maven project's version as stated in the pom file. | ||
Properties properties = new Properties(); | ||
try (InputStream resourceAsStream = EngineTest.class.getClassLoader().getResourceAsStream("maven-version.properties")) { | ||
properties.load(resourceAsStream); | ||
} catch (IOException e) { | ||
Assertions.fail("Can't load the properties file that contain the Maven's project version"); | ||
} | ||
|
||
// Then the Maven project's version should be equal to the Engine's version. | ||
assertEquals(Engine.VERSION, properties.getProperty("maven.version")); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
org.restlet.java/org.restlet/src/test/resources/maven-version.properties
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 @@ | ||
maven.version=${project.version} |