public class MavenBuildAssert extends AbstractTextAssert<MavenBuildAssert>
| Constructor and Description |
|---|
MavenBuildAssert(Path pomFile) |
MavenBuildAssert(String content) |
| Modifier and Type | Method and Description |
|---|---|
MavenBuildAssert |
doesNotHaveBom(String groupId,
String artifactId)
Assert that
pom.xml does not define the specified bom. |
MavenBuildAssert |
doesNotHaveDependency(String groupId,
String artifactId)
Assert that
pom.xml does not define a dependency with the specified
groupId and artifactId. |
MavenBuildAssert |
doesNotHaveNode(String path)
Assert
pom.xml does not define a node with the specified path. |
MavenBuildAssert |
doesNotHaveProfile(String id)
Assert
pom.xml does not define a profile with the specified id. |
MavenBuildAssert |
doesNotHaveProperty(String name)
Assert
pom.xml does not define the specified property. |
MavenBuildAssert |
hasArtifactId(String artifactId)
Assert
pom.xml uses the specified artifactId. |
MavenBuildAssert |
hasBom(String groupId,
String artifactId,
String version)
Assert
pom.xml defines the specified bom. |
MavenBuildAssert |
hasBomsSize(int size)
Assert
pom.xml defines the specified number of boms. |
MavenBuildAssert |
hasDependenciesSize(int size)
Assert
pom.xml defines the specified number of dependencies. |
MavenBuildAssert |
hasDependency(Dependency dependency)
Assert
pom.xml defines the specified dependency. |
MavenBuildAssert |
hasDependency(String groupId,
String artifactId)
Assert
pom.xml defines the specified dependency with no version and compile
scope. |
MavenBuildAssert |
hasDependency(String groupId,
String artifactId,
String version)
Assert
pom.xml defines the specified dependency with compile scope. |
MavenBuildAssert |
hasDependency(String groupId,
String artifactId,
String version,
String scope)
Assert
pom.xml defines the specified dependency with the specified scope. |
MavenBuildAssert |
hasDescription(String description)
Assert
pom.xml uses the specified description. |
MavenBuildAssert |
hasGroupId(String groupId)
Assert
pom.xml uses the specified groupId. |
MavenBuildAssert |
hasName(String name)
Assert
pom.xml uses the specified name. |
MavenBuildAssert |
hasPackaging(String packaging)
Assert
pom.xml uses the specified packaging. |
MavenBuildAssert |
hasParent(String groupId,
String artifactId,
String version)
Assert
pom.xml defines the specified parent. |
MavenBuildAssert |
hasProfile(String id)
Assert
pom.xml defines a profile with the specified id. |
MavenBuildAssert |
hasProperty(String name,
String value)
Assert
pom.xml defines the specified property. |
MavenBuildAssert |
hasRepositoriesSize(int size)
Assert
pom.xml defines the specified number of repositories. |
MavenBuildAssert |
hasRepository(String id,
String name,
String url,
Boolean snapshotsEnabled)
Assert
pom.xml defines the specified repository. |
MavenBuildAssert |
hasText(String path,
String value)
Assert
pom.xml contains the specified value at the specified path. |
MavenBuildAssert |
hasVersion(String version)
Assert
pom.xml uses the specified version. |
containsExactly, hasSameContentAs, linesdecodedAsBase64, isBase64, isBetween, isEqualTo, isEqualTo, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, isStrictlyBetween, usingComparator, usingComparator, usingDefaultComparatorcontains, contains, containsIgnoringCase, containsOnlyDigits, containsOnlyOnce, containsOnlyWhitespaces, containsPattern, containsPattern, containsSequence, containsSequence, containsSubsequence, containsSubsequence, containsWhitespaces, doesNotContain, doesNotContain, doesNotContainAnyWhitespaces, doesNotContainIgnoringCase, doesNotContainOnlyWhitespaces, doesNotContainPattern, doesNotContainPattern, doesNotEndWith, doesNotMatch, doesNotMatch, doesNotStartWith, endsWith, hasLineCount, hasSameSizeAs, hasSameSizeAs, hasSameSizeAs, hasSize, hasSizeBetween, hasSizeGreaterThan, hasSizeGreaterThanOrEqualTo, hasSizeLessThan, hasSizeLessThanOrEqualTo, inHexadecimal, inUnicode, isBlank, isEmpty, isEqualToIgnoringCase, isEqualToIgnoringNewLines, isEqualToIgnoringWhitespace, isEqualToNormalizingNewlines, isEqualToNormalizingPunctuationAndWhitespace, isEqualToNormalizingWhitespace, isJavaBlank, isLowerCase, isNotBlank, isNotEmpty, isNotEqualToIgnoringCase, isNotEqualToIgnoringWhitespace, isNotEqualToNormalizingWhitespace, isNotJavaBlank, isNullOrEmpty, isSubstringOf, isUpperCase, isXmlEqualTo, isXmlEqualToContentOf, matches, matches, startsWith, usingDefaultElementComparator, usingElementComparatorasInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorpublic MavenBuildAssert(String content)
public MavenBuildAssert(Path pomFile)
public MavenBuildAssert hasParent(String groupId, String artifactId, String version)
pom.xml defines the specified parent.groupId - the groupId of the parentartifactId - the artifactId of the parentversion - the version of the parentthis assertion objectpublic MavenBuildAssert hasGroupId(String groupId)
pom.xml uses the specified groupId.groupId - the groupId of the projectthis assertion objectpublic MavenBuildAssert hasArtifactId(String artifactId)
pom.xml uses the specified artifactId.artifactId - the artifactId of the projectthis assertion objectpublic MavenBuildAssert hasVersion(String version)
pom.xml uses the specified version.version - the version of the projectthis assertion objectpublic MavenBuildAssert hasPackaging(String packaging)
pom.xml uses the specified packaging.packaging - the packaging of the projectthis assertion objectpublic MavenBuildAssert hasName(String name)
pom.xml uses the specified name.name - the name of the projectthis assertion objectpublic MavenBuildAssert hasDescription(String description)
pom.xml uses the specified description.description - the description of the projectthis assertion objectpublic MavenBuildAssert hasProperty(String name, String value)
pom.xml defines the specified property.name - the name of the propertyvalue - the value of the propertythis assertion objectpublic MavenBuildAssert doesNotHaveProperty(String name)
pom.xml does not define the specified property.name - the name of the propertythis assertion objectpublic MavenBuildAssert hasDependenciesSize(int size)
pom.xml defines the specified number of dependencies.size - the number of dependenciesthis assertion objectpublic MavenBuildAssert hasDependency(String groupId, String artifactId)
pom.xml defines the specified dependency with no version and compile
scope.groupId - the groupId of the dependencyartifactId - the artifactId of the dependencythis assertion objectpublic MavenBuildAssert hasDependency(String groupId, String artifactId, String version)
pom.xml defines the specified dependency with compile scope.groupId - the groupId of the dependencyartifactId - the artifactId of the dependencyversion - the version of the dependencythis assertion objectpublic MavenBuildAssert hasDependency(String groupId, String artifactId, String version, String scope)
pom.xml defines the specified dependency with the specified scope.groupId - the groupId of the dependencyartifactId - the artifactId of the dependencyversion - the version of the dependencyscope - the scope of the dependencythis assertion objectpublic MavenBuildAssert hasDependency(Dependency dependency)
pom.xml defines the specified dependency.dependency - the dependencythis assertion objectpublic MavenBuildAssert doesNotHaveDependency(String groupId, String artifactId)
pom.xml does not define a dependency with the specified
groupId and artifactId.groupId - the dependency's groupIdartifactId - the dependency's artifactIdthis assertion objectpublic MavenBuildAssert hasBomsSize(int size)
pom.xml defines the specified number of boms.size - the number of bomsthis assertion objectpublic MavenBuildAssert hasBom(String groupId, String artifactId, String version)
pom.xml defines the specified bom.groupId - the groupId of the bomartifactId - the artifactId of the bomversion - the version of the bomthis assertion objectpublic MavenBuildAssert doesNotHaveBom(String groupId, String artifactId)
pom.xml does not define the specified bom.groupId - the groupId of the bomartifactId - the artifactId of the bomthis assertion objectpublic MavenBuildAssert hasRepositoriesSize(int size)
pom.xml defines the specified number of repositories.size - the number of repositoriesthis assertion objectpublic MavenBuildAssert hasRepository(String id, String name, String url, Boolean snapshotsEnabled)
pom.xml defines the specified repository.id - the id of the repositoryname - the name of the repositoryurl - the url of the repositorysnapshotsEnabled - whether snapshot is enabled for the repositorythis assertion objectpublic MavenBuildAssert hasProfile(String id)
pom.xml defines a profile with the specified id.id - the id of the profilethis assertion objectpublic MavenBuildAssert doesNotHaveProfile(String id)
pom.xml does not define a profile with the specified id.id - the id of the profilethis assertion objectpublic MavenBuildAssert doesNotHaveNode(String path)
pom.xml does not define a node with the specified path.path - the path of the nodepublic MavenBuildAssert hasText(String path, String value)
pom.xml contains the specified value at the specified path.path - the path to the elementvalue - the expected value of the elementCopyright © 2021 Pivotal Software, Inc.. All rights reserved.