Search in sources :

Example 11 with ExpectedDependencies

use of com.github.sevntu.checkstyle.domain.ExpectedDependencies in project methods-distance by sevntu-checkstyle.

the class MethodCallDependencyCheckstyleModuleTest method testMethodCallThroughMethodReference.

@Test
public void testMethodCallThroughMethodReference() throws Exception {
    final DefaultConfiguration dc = createCheckConfig(MethodCallDependencyCheckstyleModule.class);
    final ExpectedDependencies expected = ExpectedDependencies.build().method("a()").callsTo(2).at(11, 61).method("a1()").method("a1(Integer)").method("b()").callsTo(5).at(20, 24).method("b1()").method("b1(Integer)").get();
    verifyInfo(dc, "InputMethodCallThroughMethodReference.java", expected);
}
Also used : DefaultConfiguration(com.puppycrawl.tools.checkstyle.DefaultConfiguration) ExpectedDependencies(com.github.sevntu.checkstyle.domain.ExpectedDependencies) Test(org.junit.Test)

Aggregations

ExpectedDependencies (com.github.sevntu.checkstyle.domain.ExpectedDependencies)11 DefaultConfiguration (com.puppycrawl.tools.checkstyle.DefaultConfiguration)11 Test (org.junit.Test)10 DependencyInformationConsumerInjector (com.github.sevntu.checkstyle.common.DependencyInformationConsumerInjector)1 BaseCheckTestSupport (com.github.sevntu.checkstyle.domain.BaseCheckTestSupport)1 Dependencies (com.github.sevntu.checkstyle.domain.Dependencies)1 DependencyInformationConsumer (com.github.sevntu.checkstyle.module.DependencyInformationConsumer)1 MethodCallDependencyCheckstyleModule (com.github.sevntu.checkstyle.module.MethodCallDependencyCheckstyleModule)1 Method (com.github.sevntu.checkstyle.ordering.Method)1 MethodOrder (com.github.sevntu.checkstyle.ordering.MethodOrder)1 Checker (com.puppycrawl.tools.checkstyle.Checker)1 Configuration (com.puppycrawl.tools.checkstyle.api.Configuration)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Locale (java.util.Locale)1 Map (java.util.Map)1 Assert.assertEquals (org.junit.Assert.assertEquals)1 Assert.assertTrue (org.junit.Assert.assertTrue)1