use of com.tngtech.archunit.lang.ConditionEvent in project ArchUnit by TNG.
the class NeverCondition method check.
@Override
public void check(T item, ConditionEvents events) {
ConditionEvents subEvents = new ConditionEvents();
condition.check(item, subEvents);
for (ConditionEvent event : subEvents) {
event.addInvertedTo(events);
}
}
use of com.tngtech.archunit.lang.ConditionEvent in project gradle by gradle.
the class ArchUnitFixtureTest method reports_invalid_generic_type_parameter_of_return_type.
@Test
public void reports_invalid_generic_type_parameter_of_return_type() {
ConditionEvent event = checkThatHasOnlyAllowedTypes("invalidTypeParameterInReturnType");
assertHasViolation(event, File.class);
}
use of com.tngtech.archunit.lang.ConditionEvent in project gradle by gradle.
the class ArchUnitFixtureTest method reports_valid_methods.
@Test
public void reports_valid_methods() {
ConditionEvent event = checkThatHasOnlyAllowedTypes("validMethod");
assertNoViolation(event);
}
use of com.tngtech.archunit.lang.ConditionEvent in project gradle by gradle.
the class ArchUnitFixtureTest method reports_invalid_generic_type_parameter_bound.
@Test
public void reports_invalid_generic_type_parameter_bound() {
ConditionEvent event = checkThatHasOnlyAllowedTypes("invalidTypeParameterBoundType");
assertHasViolation(event, File.class);
}
use of com.tngtech.archunit.lang.ConditionEvent in project gradle by gradle.
the class ArchUnitFixtureTest method reports_invalid_return_types.
@Test
public void reports_invalid_return_types() {
ConditionEvent event = checkThatHasOnlyAllowedTypes("invalidReturnType");
assertHasViolation(event, File.class);
}
Aggregations