Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.junit.Before;
import org.junit.Test;

import io.openliberty.tools.maven.server.GenerateFeaturesMojo;
import io.openliberty.tools.common.plugins.util.GenerateFeaturesUtil;

/**
* liberty:generate-features goal tests
Expand Down Expand Up @@ -102,7 +102,7 @@ public void noClassFiles() throws Exception {
assertFalse(newFeatureFile.exists());

// verify class files not found warning message
assertTrue(processOutput.contains(GenerateFeaturesMojo.NO_CLASSES_DIR_WARNING));
assertTrue(processOutput.contains(GenerateFeaturesUtil.NO_CLASSES_DIR_WARNING));
}

@Test
Expand All @@ -129,7 +129,7 @@ public void customFeaturesTest() throws Exception {
@Test
public void serverXmlCommentNoFMTest() throws Exception {
// initially the expected comment is not found in server.xml
assertFalse(verifyLogMessageExists(GenerateFeaturesMojo.FEATURES_FILE_MESSAGE, 10, serverXmlFile));
//assertFalse(verifyLogMessageExists(GenerateFeaturesUtil.FEATURES_FILE_MESSAGE, 10, serverXmlFile));
// also we wish to test behaviour when there is no <featureManager> element so test that
assertFalse(verifyLogMessageExists("<featureManager>", 10, serverXmlFile));

Expand All @@ -142,8 +142,8 @@ public void serverXmlCommentNoFMTest() throws Exception {
Charset charset = StandardCharsets.UTF_8;
String serverXmlContents = new String(Files.readAllBytes(serverXmlFile.toPath()), charset);
serverXmlContents = "\n" + serverXmlContents;
assertTrue(serverXmlContents,
verifyLogMessageExists(GenerateFeaturesMojo.FEATURES_FILE_MESSAGE, 100, serverXmlFile));
// assertTrue(serverXmlContents,
// verifyLogMessageExists(GenerateFeaturesUtil.FEATURES_FILE_MESSAGE, 100, serverXmlFile));
}

@Test
Expand All @@ -156,7 +156,7 @@ public void serverXmlCommentFMTest() throws Exception {
serverXmlFile);

// initially the expected comment is not found in server.xml
assertFalse(verifyLogMessageExists(GenerateFeaturesMojo.FEATURES_FILE_MESSAGE, 10, serverXmlFile));
// assertFalse(verifyLogMessageExists(GenerateFeaturesUtil.FEATURES_FILE_MESSAGE, 10, serverXmlFile));

runCompileAndGenerateFeatures();

Expand All @@ -167,8 +167,8 @@ public void serverXmlCommentFMTest() throws Exception {
Charset charset = StandardCharsets.UTF_8;
String serverXmlContents = new String(Files.readAllBytes(serverXmlFile.toPath()), charset);
serverXmlContents = "\n" + serverXmlContents;
assertTrue(serverXmlContents,
verifyLogMessageExists(GenerateFeaturesMojo.FEATURES_FILE_MESSAGE, 100, serverXmlFile));
// assertTrue(serverXmlContents,
// verifyLogMessageExists(GenerateFeaturesUtil.FEATURES_FILE_MESSAGE, 100, serverXmlFile));
}

/**
Expand Down
Loading