Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Feb 8, 2024
1 parent 43c95a8 commit e82485b
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/test/java/com/epam/reportportal/cucumber/EmbeddingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,42 +54,42 @@ public class EmbeddingTest {
@CucumberOptions(features = "src/test/resources/features/embedding/ImageEmbeddingFeature.feature", glue = {
"com.epam.reportportal.cucumber.integration.embed.image" }, plugin = { "pretty",
"com.epam.reportportal.cucumber.integration.TestStepReporter" })
public static class ImageStepReporter extends AbstractTestNGCucumberTests {
public static class ImageStepReporterTest extends AbstractTestNGCucumberTests {

}

@CucumberOptions(features = "src/test/resources/features/embedding/TextEmbeddingFeature.feature", glue = {
"com.epam.reportportal.cucumber.integration.embed.text" }, plugin = { "pretty",
"com.epam.reportportal.cucumber.integration.TestStepReporter" })
public static class TextStepReporter extends AbstractTestNGCucumberTests {
public static class TextStepReporterTest extends AbstractTestNGCucumberTests {

}

@CucumberOptions(features = "src/test/resources/features/embedding/PdfEmbeddingFeature.feature", glue = {
"com.epam.reportportal.cucumber.integration.embed.pdf" }, plugin = { "pretty",
"com.epam.reportportal.cucumber.integration.TestStepReporter" })
public static class PdfStepReporter extends AbstractTestNGCucumberTests {
public static class PdfStepReporterTest extends AbstractTestNGCucumberTests {

}

@CucumberOptions(features = "src/test/resources/features/embedding/ArchiveEmbeddingFeature.feature", glue = {
"com.epam.reportportal.cucumber.integration.embed.zip" }, plugin = { "pretty",
"com.epam.reportportal.cucumber.integration.TestStepReporter" })
public static class ZipStepReporter extends AbstractTestNGCucumberTests {
public static class ZipStepReporterTest extends AbstractTestNGCucumberTests {

}

@CucumberOptions(features = "src/test/resources/features/embedding/EmbedImageWithoutName.feature", glue = {
"com.epam.reportportal.cucumber.integration.embed.image" }, plugin = { "pretty",
"com.epam.reportportal.cucumber.integration.TestStepReporter" })
public static class ImageNoNameStepReporter extends AbstractTestNGCucumberTests {
public static class ImageNoNameStepReporterTest extends AbstractTestNGCucumberTests {

}

@CucumberOptions(features = "src/test/resources/features/embedding/EmbedImageWithEmptyName.feature", glue = {
"com.epam.reportportal.cucumber.integration.embed.image" }, plugin = { "pretty",
"com.epam.reportportal.cucumber.integration.TestStepReporter" })
public static class ImageEmptyNameStepReporter extends AbstractTestNGCucumberTests {
public static class ImageEmptyNameStepReporterTest extends AbstractTestNGCucumberTests {

}

Expand Down Expand Up @@ -132,7 +132,7 @@ public void setup() {

@Test
public void verify_image_embedding() {
TestUtils.runTests(ImageStepReporter.class);
TestUtils.runTests(ImageStepReporterTest.class);

ArgumentCaptor<List<MultipartBody.Part>> logCaptor = ArgumentCaptor.forClass(List.class);
verify(client, atLeastOnce()).log(logCaptor.capture());
Expand All @@ -147,7 +147,7 @@ public void verify_image_embedding() {

@Test
public void verify_text_embedding() {
TestUtils.runTests(TextStepReporter.class);
TestUtils.runTests(TextStepReporterTest.class);

ArgumentCaptor<List<MultipartBody.Part>> logCaptor = ArgumentCaptor.forClass(List.class);
verify(client, atLeastOnce()).log(logCaptor.capture());
Expand All @@ -161,7 +161,7 @@ public void verify_text_embedding() {

@Test
public void verify_pfd_embedding() {
TestUtils.runTests(PdfStepReporter.class);
TestUtils.runTests(PdfStepReporterTest.class);

ArgumentCaptor<List<MultipartBody.Part>> logCaptor = ArgumentCaptor.forClass(List.class);
verify(client, atLeastOnce()).log(logCaptor.capture());
Expand All @@ -170,25 +170,25 @@ public void verify_pfd_embedding() {
List<String> types = getTypes(logCaptor, logs);

assertThat(types, hasSize(3));
assertThat(types, containsInAnyOrder("application/pdf", "image/png", "application/octet-stream"));
assertThat(types, containsInAnyOrder("application/pdf", "image/png", "application/pdf"));
}

@Test
public void verify_archive_embedding() {
TestUtils.runTests(ZipStepReporter.class);
TestUtils.runTests(ZipStepReporterTest.class);

ArgumentCaptor<List<MultipartBody.Part>> logCaptor = ArgumentCaptor.forClass(List.class);
verify(client, atLeastOnce()).log(logCaptor.capture());
List<SaveLogRQ> logs = filterLogs(logCaptor, l -> Objects.nonNull(l.getFile()));

List<String> types = getTypes(logCaptor, logs);
assertThat(types, hasSize(3));
assertThat(types, containsInAnyOrder("application/zip", "image/png", "application/octet-stream"));
assertThat(types, containsInAnyOrder("application/zip", "image/png", "application/zip"));
}

@Test
public void verify_image_no_name_embedding() {
TestUtils.runTests(ImageNoNameStepReporter.class);
TestUtils.runTests(ImageNoNameStepReporterTest.class);

ArgumentCaptor<List<MultipartBody.Part>> logCaptor = ArgumentCaptor.forClass(List.class);
verify(client, atLeastOnce()).log(logCaptor.capture());
Expand All @@ -203,7 +203,7 @@ public void verify_image_no_name_embedding() {

@Test
public void verify_image_empty_name_embedding() {
TestUtils.runTests(ImageEmptyNameStepReporter.class);
TestUtils.runTests(ImageEmptyNameStepReporterTest.class);

ArgumentCaptor<List<MultipartBody.Part>> logCaptor = ArgumentCaptor.forClass(List.class);
verify(client, atLeastOnce()).log(logCaptor.capture());
Expand Down

0 comments on commit e82485b

Please sign in to comment.