Core Maven Plugins
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.baeldung.maven.plugins;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Data {
|
||||
List<String> textList = new ArrayList();
|
||||
|
||||
public void addText(String text) {
|
||||
textList.add(text);
|
||||
}
|
||||
|
||||
public List getTextList() {
|
||||
return this.textList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.baeldung.maven.plugins;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.baeldung.maven.plugins.Data;
|
||||
|
||||
public class DataCheck {
|
||||
@Test
|
||||
public void whenDataObjectIsCreated_thenItIsNotNull() {
|
||||
Data data = new Data();
|
||||
assertNotNull(data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.baeldung.maven.plugins;
|
||||
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.baeldung.maven.plugins.Data;
|
||||
|
||||
public class DataTest {
|
||||
@Test
|
||||
public void whenDataObjectIsNotCreated_thenItIsNull() {
|
||||
Data data = null;
|
||||
assertNull(data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user