use of org.eclipse.jkube.kit.common.SystemMock in project jkube by eclipse.
the class EnvUtilTest method testIsWindowsFalse.
@Test
public void testIsWindowsFalse() {
// Given
new SystemMock().put("os.name", "random");
// When
boolean result = EnvUtil.isWindows();
// Then
assertThat(result).isFalse();
}
use of org.eclipse.jkube.kit.common.SystemMock in project jkube by eclipse.
the class JKubeProjectUtilTest method getProperty_whenSystemPropertyPresent_returnsSystemProperty.
@Test
public void getProperty_whenSystemPropertyPresent_returnsSystemProperty() {
// Given
new SystemMock().put("jkube.testProperty", "true");
JavaProject javaProject = JavaProject.builder().build();
// When
String result = JKubeProjectUtil.getProperty("jkube.testProperty", javaProject);
// Then
assertThat(result).isEqualTo("true");
}
Aggregations