
com.codeborne.pdftest.assertj.PdfAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pdf-test Show documentation
Show all versions of pdf-test Show documentation
PDF Test: PDF testing library
package com.codeborne.pdftest.assertj;
import com.codeborne.pdftest.PDF;
import com.codeborne.pdftest.matchers.ContainsExactText;
import com.codeborne.pdftest.matchers.ContainsText;
import com.codeborne.pdftest.matchers.ContainsTextCaseInsensitive;
import com.codeborne.pdftest.matchers.DoesNotContainExactText;
import com.codeborne.pdftest.matchers.DoesNotContainText;
import org.assertj.core.api.AbstractAssert;
import static org.hamcrest.MatcherAssert.assertThat;
public class PdfAssert extends AbstractAssert {
public PdfAssert(PDF actual) {
super(actual, PdfAssert.class);
}
public PdfAssert containsText(String text, String... texts) {
isNotNull();
assertThat(actual, new ContainsText(text, texts));
return this;
}
public PdfAssert doesNotContainText(String text, String... texts) {
isNotNull();
assertThat(actual, new DoesNotContainText(text, texts));
return this;
}
public PdfAssert containsExactText(String substring) {
isNotNull();
assertThat(actual, new ContainsExactText(substring));
return this;
}
public PdfAssert doesNotContainExactText(String substring) {
isNotNull();
assertThat(actual, new DoesNotContainExactText(substring));
return this;
}
public PdfAssert containsTextCaseInsensitive(String substring) {
isNotNull();
assertThat(actual, new ContainsTextCaseInsensitive(substring));
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy