public class StringHelperTest { @Test public void testConcatenateStrings() { StringHelper helper = new StringHelper(); String result = helper.concatenateStrings("Hello", "World"); assertEquals("HelloWorld", result); } @Test public void testSplitString() { StringHelper helper = new StringHelper(); String[] result = helper.splitString("Hello,World", ","); assertEquals(2, result.length); assertEquals("Hello", result[0]); assertEquals("World", result[1]); } } <build> <plugins> <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.8.5</version> <executions> <execution> <id>prepare-agent</id> <goals> <goal>prepare-agent</goal> </goals> </execution> <execution> <id>report</id> <goals> <goal>report</goal> </goals> </execution> </executions> </plugin> </plugins> </build>


上一篇:
下一篇:
切换中文