use of com.github.sevntu.checkstyle.domain.ExpectedDependencies in project methods-distance by sevntu-checkstyle.
the class MethodCallDependencyCheckstyleModuleTest method testMethodCallsInLambda.
@Test
public void testMethodCallsInLambda() throws Exception {
final DefaultConfiguration dc = createCheckConfig(MethodCallDependencyCheckstyleModule.class);
final ExpectedDependencies expected = ExpectedDependencies.build().method("m()").callsTo(1).at(8, 43).method("dependency()").get();
verifyInfo(dc, "InputMethodCallsInLambda.java", expected);
}
use of com.github.sevntu.checkstyle.domain.ExpectedDependencies in project methods-distance by sevntu-checkstyle.
the class MethodCallDependencyCheckstyleModuleTest method testRecursiveMethod.
@Test
public void testRecursiveMethod() throws Exception {
final DefaultConfiguration dc = createCheckConfig(MethodCallDependencyCheckstyleModule.class);
final ExpectedDependencies expected = ExpectedDependencies.build().method("method()").callsTo(0).at(6, 14).get();
verifyInfo(dc, "InputRecursiveMethod.java", expected);
}
use of com.github.sevntu.checkstyle.domain.ExpectedDependencies in project methods-distance by sevntu-checkstyle.
the class MethodCallDependencyCheckstyleModuleTest method testNotThisClassMethodCall.
@Test
public void testNotThisClassMethodCall() throws Exception {
final DefaultConfiguration dc = createCheckConfig(MethodCallDependencyCheckstyleModule.class);
final ExpectedDependencies expected = ExpectedDependencies.build().method("method()").method("format(String)").get();
verifyInfo(dc, "InputMethodNameClashes.java", expected);
}
use of com.github.sevntu.checkstyle.domain.ExpectedDependencies in project methods-distance by sevntu-checkstyle.
the class MethodCallDependencyCheckstyleModuleTest method testSimpleDependency.
@Test
public void testSimpleDependency() throws Exception {
final DefaultConfiguration dc = createCheckConfig(MethodCallDependencyCheckstyleModule.class);
final ExpectedDependencies dependencies = ExpectedDependencies.build().method("InputSimpleDependency()").callsTo(1).at(6, 17).method("dependant()").callsTo(2).at(10, 18).method("dependency()").callsTo(3).at(14, 29).callsTo(4).at(15, 29).method("dependencyDependency1()").method("dependencyDependency2()").get();
verifyInfo(dc, "InputSimpleDependency.java", dependencies);
}
use of com.github.sevntu.checkstyle.domain.ExpectedDependencies in project methods-distance by sevntu-checkstyle.
the class MethodCallDependencyCheckstyleModuleTest method testMethodSignatures.
@Test
public void testMethodSignatures() throws Exception {
final DefaultConfiguration dc = createCheckConfig(MethodCallDependencyCheckstyleModule.class);
final ExpectedDependencies dep = ExpectedDependencies.build().method("m()").method("m(boolean)").method("m(char)").method("m(byte)").method("m(short)").method("m(int)").method("m(long)").method("m(double)").method("m(String)").method("m(String,String)").method("m(String,Integer...)").method("m(Integer...)").method("m(int[])").method("m(Long[])").method("m(List)").method("m(String,List...)").method("m(List[])").method("m(List[]...)").get();
verifyInfo(dc, "InputMethodSignatures.java", dep);
}
Aggregations