优化测试用例
This commit is contained in:
parent
46c974eead
commit
6c25e26f25
|
@ -13,7 +13,7 @@ import org.junit.jupiter.api.AfterAll;
|
|||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.DisabledIf;
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -65,7 +65,7 @@ public class AbsoluteConfigPathELDeclMultiSpringbootTest extends BaseTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@DisabledIf("isWindows")
|
||||
@EnabledIf("isWindows")
|
||||
public void testAbsPath() throws Exception{
|
||||
Assertions.assertTrue(() -> {
|
||||
LiteflowConfig config = LiteflowConfigGetter.get();
|
||||
|
@ -80,7 +80,7 @@ public class AbsoluteConfigPathELDeclMultiSpringbootTest extends BaseTest {
|
|||
String osName = System.getProperty("os.name");
|
||||
if (osName.isEmpty()) return false;
|
||||
else {
|
||||
return osName.contains("windows");
|
||||
return osName.contains("Windows");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
|
|
|
@ -15,7 +15,7 @@ import org.junit.jupiter.api.AfterAll;
|
|||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.DisabledIf;
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -67,7 +67,7 @@ public class AbsoluteConfigPathELDeclSpringbootTest extends BaseTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@DisabledIf("isWindows")
|
||||
@EnabledIf("isWindows")
|
||||
public void testAbsPath() throws Exception{
|
||||
Assertions.assertTrue(() -> {
|
||||
LiteflowConfig config = LiteflowConfigGetter.get();
|
||||
|
@ -82,7 +82,7 @@ public class AbsoluteConfigPathELDeclSpringbootTest extends BaseTest {
|
|||
String osName = System.getProperty("os.name");
|
||||
if (osName.isEmpty()) return false;
|
||||
else {
|
||||
return osName.contains("windows");
|
||||
return osName.contains("Windows");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.junit.jupiter.api.AfterAll;
|
|||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.DisabledIf;
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class AbsoluteConfigPathTest extends BaseTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@DisabledIf("isWindows")
|
||||
@EnabledIf("isWindows")
|
||||
public void testAbsPath() throws Exception{
|
||||
Assertions.assertTrue(() -> {
|
||||
LiteflowConfig config = new LiteflowConfig();
|
||||
|
@ -67,7 +67,7 @@ public class AbsoluteConfigPathTest extends BaseTest {
|
|||
String osName = System.getProperty("os.name");
|
||||
if (osName.isEmpty()) return false;
|
||||
else {
|
||||
return osName.contains("windows");
|
||||
return osName.contains("Windows");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.junit.jupiter.api.AfterAll;
|
|||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.DisabledIf;
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.noear.solon.annotation.Inject;
|
||||
import org.noear.solon.test.SolonJUnit5Extension;
|
||||
|
@ -58,7 +58,7 @@ public class AbsoluteConfigPathELSpringbootTest extends BaseTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@DisabledIf("isWindows")
|
||||
@EnabledIf("isWindows")
|
||||
public void testAbsTest() throws Exception {
|
||||
Assertions.assertTrue(() -> {
|
||||
LiteflowConfig config = LiteflowConfigGetter.get();
|
||||
|
@ -73,7 +73,7 @@ public class AbsoluteConfigPathELSpringbootTest extends BaseTest {
|
|||
String osName = System.getProperty("os.name");
|
||||
if (osName.isEmpty()) return false;
|
||||
else {
|
||||
return osName.contains("windows");
|
||||
return osName.contains("Windows");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.junit.jupiter.api.AfterAll;
|
|||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.DisabledIf;
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
|
@ -72,7 +72,7 @@ public class AbsoluteConfigPathELSpringbootTest extends BaseTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@DisabledIf("isWindows")
|
||||
@EnabledIf("isWindows")
|
||||
public void testAbsPath4() throws Exception{
|
||||
Assertions.assertTrue(() -> {
|
||||
LiteflowConfig config = LiteflowConfigGetter.get();
|
||||
|
@ -87,7 +87,7 @@ public class AbsoluteConfigPathELSpringbootTest extends BaseTest {
|
|||
String osName = System.getProperty("os.name");
|
||||
if (osName.isEmpty()) return false;
|
||||
else {
|
||||
return osName.contains("windows");
|
||||
return osName.contains("Windows");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.junit.jupiter.api.AfterAll;
|
|||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.DisabledIf;
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
@ -57,7 +57,7 @@ public class AbsoluteConfigPathELSpringTest extends BaseTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@DisabledIf("isWindows")
|
||||
@EnabledIf("isWindows")
|
||||
public void testAbsPath() throws Exception{
|
||||
Assertions.assertTrue(() -> {
|
||||
LiteflowConfig config = LiteflowConfigGetter.get();
|
||||
|
@ -72,7 +72,7 @@ public class AbsoluteConfigPathELSpringTest extends BaseTest {
|
|||
String osName = System.getProperty("os.name");
|
||||
if (osName.isEmpty()) return false;
|
||||
else {
|
||||
return osName.contains("windows");
|
||||
return osName.contains("Windows");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue