Search in sources :

Example 6 with InvokedMethodNameListener

use of io.github.sskorol.listeners.InvokedMethodNameListener in project selenium_java by sergueik.

the class DataSupplierTests method commonDataProviderTestsShouldWork.

@Test
public void commonDataProviderTestsShouldWork() {
    final InvokedMethodNameListener listener = run(CommonDataProviderTests.class);
    assertThat(listener.getSucceedMethodNames()).hasSize(3).containsExactly("shouldPassWithCommonDataProvider(data)", "shouldPassWithExternalDataProvider(data)", "shouldPassWithoutDataProvider()");
}
Also used : InvokedMethodNameListener(io.github.sskorol.listeners.InvokedMethodNameListener) Test(org.testng.annotations.Test)

Example 7 with InvokedMethodNameListener

use of io.github.sskorol.listeners.InvokedMethodNameListener in project selenium_java by sergueik.

the class DataSupplierTests method streamsDataSuppliersShouldWork.

@Test
public void streamsDataSuppliersShouldWork() {
    final InvokedMethodNameListener listener = run(StreamsDataSupplierTests.class);
    assertThat(listener.getSucceedMethodNames()).hasSize(13).containsExactly("supplyCustomStreamData(user2)", "supplyCustomStreamData(user3)", "supplyExternalStreamData(1)", "supplyExternalStreamData(3)", "supplyExternalStreamData(5)", "supplyExternalStreamData(7)", "supplyExternalStreamData(9)", "supplyExtractedCustomStreamData(User(name=Mark, password=password1),User(name=Petya, password=password2))", "supplyPrimitiveStreamData(0)", "supplyPrimitiveStreamData(2)", "supplyPrimitiveStreamData(4)", "supplyPrimitiveStreamData(6)", "supplyPrimitiveStreamData(8)");
}
Also used : InvokedMethodNameListener(io.github.sskorol.listeners.InvokedMethodNameListener) Test(org.testng.annotations.Test)

Example 8 with InvokedMethodNameListener

use of io.github.sskorol.listeners.InvokedMethodNameListener in project selenium_java by sergueik.

the class DataSupplierTests method namedDataSupplierTestsShouldWork.

@Test
public void namedDataSupplierTestsShouldWork() {
    final InvokedMethodNameListener listener = run(DataSupplierWithCustomNamesTests.class);
    assertThat(listener.getSucceedMethodNames()).hasSize(2).containsExactly("supplyExternalPasswordFromNamedDataSupplier(qwerty)", "supplyUserFromNamedDataSupplier(User(name=userFromNamedDataSupplier, password=password))");
}
Also used : InvokedMethodNameListener(io.github.sskorol.listeners.InvokedMethodNameListener) Test(org.testng.annotations.Test)

Example 9 with InvokedMethodNameListener

use of io.github.sskorol.listeners.InvokedMethodNameListener in project selenium_java by sergueik.

the class DataSupplierTests method collectionsDataSuppliersShouldWork.

@Test
public void collectionsDataSuppliersShouldWork() {
    final InvokedMethodNameListener listener = run(CollectionsDataSupplierTests.class);
    assertThat(listener.getSucceedMethodNames()).hasSize(5).containsExactly("supplyCommonListData(data1)", "supplyCommonListData(data2)", "supplyCustomListData([null,User(name=username, password=password)])", "supplyExternalCollectionData(data1)", "supplyExternalCollectionData(data2)");
}
Also used : InvokedMethodNameListener(io.github.sskorol.listeners.InvokedMethodNameListener) Test(org.testng.annotations.Test)

Example 10 with InvokedMethodNameListener

use of io.github.sskorol.listeners.InvokedMethodNameListener in project selenium_java by sergueik.

the class DataSupplierTests method parallelDataSupplierTestsShouldWork.

@Test
public void parallelDataSupplierTestsShouldWork() {
    final InvokedMethodNameListener listener = run(ParallelDataSupplierTests.class);
    assertThat(listener.getSucceedMethodNames()).hasSize(4).containsExactlyInAnyOrder("supplyParallelData(data1)", "supplyParallelData(data2)", "supplySeqData(data1)", "supplySeqData(data2)");
    assertThat(EntryStream.of(listener.getThreads()).values().flatMap(Collection::stream).distinct().toList()).hasSize(3);
}
Also used : InvokedMethodNameListener(io.github.sskorol.listeners.InvokedMethodNameListener) Collection(java.util.Collection) Test(org.testng.annotations.Test)

Aggregations

InvokedMethodNameListener (io.github.sskorol.listeners.InvokedMethodNameListener)12 Test (org.testng.annotations.Test)11 Collection (java.util.Collection)3 ITestResult (org.testng.ITestResult)3 EntryStream (one.util.streamex.EntryStream)2 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)2 DataProviderTransformer (io.github.sskorol.dataprovider.DataProviderTransformer)1 TestNG (org.testng.TestNG)1