use of io.github.sskorol.listeners.InvokedMethodNameListener in project selenium_java by sergueik.
the class DataSupplierTests method arraysDataSuppliersShouldWork.
@Test
public void arraysDataSuppliersShouldWork() {
final InvokedMethodNameListener listener = run(ArraysDataSupplierTests.class);
assertThat(listener.getSucceedMethodNames()).hasSize(10).containsExactly("supplyCustomArrayData(User(name=username, password=password))", "supplyCustomArrayData(null)", "supplyExternalArrayData(User(name=user1, password=password1),User(name=user2, password=password2))", "supplyExtractedArrayData(data1,data2)", "supplyPrimitiveDoubleArrayData(0.1)", "supplyPrimitiveDoubleArrayData(0.3)", "supplyPrimitiveIntArrayData(5)", "supplyPrimitiveLongArrayData(2)", "supplyPrimitiveLongArrayData(6)", "supplyPrimitiveLongArrayData(100)");
}
use of io.github.sskorol.listeners.InvokedMethodNameListener in project selenium_java by sergueik.
the class DataSupplierTests method nullObjectsDataSuppliersShouldWork.
@Test
public void nullObjectsDataSuppliersShouldWork() {
final InvokedMethodNameListener listener = run(NullObjectsDataSupplierTests.class);
assertThat(listener.getSkippedBeforeInvocationMethodNames()).hasSize(5).containsExactly("supplyExtractedNullObject()", "supplyNullArrayData()", "supplyNullCollectionData()", "supplyNullObjectData()", "supplyNullStreamData()");
assertThat(EntryStream.of(listener.getResults()).values().toList()).extracting(ITestResult::getThrowable).extracting(Throwable::getMessage).containsExactly("java.lang.IllegalArgumentException: Nothing to return from data supplier. The following test will be skipped: NullObjectsDataSupplierTests.supplyNullCollectionData.", "java.lang.IllegalArgumentException: Nothing to return from data supplier. The following test will be skipped: NullObjectsDataSupplierTests.supplyNullStreamData.", "java.lang.IllegalArgumentException: Nothing to return from data supplier. The following test will be skipped: NullObjectsDataSupplierTests.supplyExtractedNullObject.", "java.lang.IllegalArgumentException: Nothing to return from data supplier. The following test will be skipped: NullObjectsDataSupplierTests.supplyNullArrayData.", "java.lang.IllegalArgumentException: Nothing to return from data supplier. The following test will be skipped: NullObjectsDataSupplierTests.supplyNullObjectData.");
}
Aggregations