!286 优化测试用例

Merge pull request !286 from Rain/dev
This commit is contained in:
铂赛东 2024-05-23 11:19:43 +00:00 committed by Gitee
commit 4c930227fc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 18 additions and 18 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;