org.nuisto.ExpectationBuilder.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mule-lint Show documentation
Show all versions of mule-lint Show documentation
An application to check for consistency in a mule application.
package org.nuisto
import groovy.util.logging.Slf4j
@Slf4j(category = 'org.nuisto.msa')
class ExpectationBuilder {
Expectation currentExpectation
List expectations = new ArrayList()
ExpectationBuilder() {
}
void element(String name) {
Expectation expectation = new Expectation(elementName: name)
currentExpectation = expectation
expectations << expectation
}
void hasAttribute(String attribute) {
currentExpectation.hasAttribute(attribute)
}
void hasAttribute(String attribute, String value) {
currentExpectation.hasAttribute(attribute, value)
}
void hasAttribute(String attribute, List values) {
currentExpectation.hasAttribute(attribute, values)
}
void hasParent(String parent) {
currentExpectation.hasParent(parent)
}
List getExpectations() {
return expectations
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy