https://github.com/powerunit/powerunit
This is a unit test framework for java 8
https://github.com/powerunit/powerunit
java unit-test
Last synced: 5 months ago
JSON representation
This is a unit test framework for java 8
- Host: GitHub
- URL: https://github.com/powerunit/powerunit
- Owner: powerunit
- License: gpl-3.0
- Created: 2014-06-26T09:29:57.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2025-12-22T01:28:34.000Z (6 months ago)
- Last Synced: 2025-12-23T12:56:39.258Z (6 months ago)
- Topics: java, unit-test
- Language: Java
- Homepage:
- Size: 9.51 MB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 48
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
powerunit[](https://travis-ci.org/powerunit/powerunit)
=========
This is a unit test framework for java 8. [Please check the site for more information](http://powerunit.github.io/powerunit/).
```java
package org.powerunit.examples;
import java.util.Arrays;
import java.util.stream.Stream;
import org.powerunit.Parameter;
import org.powerunit.Parameters;
import org.powerunit.Test;
import org.powerunit.TestSuite;
public class HelloWorldParameterTest implements TestSuite {
@Parameters("Input string is {0}, subString idx is {1}, expected result is {2}")
public static Stream getDatas() {
return Arrays.stream(new Object[][] { { "ab", 0, "ab" }, { "ab", 1, "b" } });
}
@Parameter(0)
public String inputString;
@Parameter(1)
public int inputIndex;
@Parameter(2)
public String expectedString;
@Test
public void testSubString() {
assertThat(inputString.substring(inputIndex)).is(expectedString);
}
}
```