import java.io.FileNotFoundException; public class BugTester { public static void main(String[] args) throws FileNotFoundException { int start = 0; char bugSymbol = 'a'; String inputFile = "peter.txt"; Bug crawler1 = new Bug(start, bugSymbol, inputFile); crawler1.matrixBuilder(); crawler1.matrixPrinter(); } }
@Funny @Produces @BugStereotype public Bug produceJohn() { return new Bug(Bug.NAME_JOHN); }
@Produces @Named public Bug getGraham() { return new Bug(Bug.NAME_GRAHAM); }
@Test @SpecAssertions({ @SpecAssertion(section = NAMED_STEREOTYPE, id = "aa"), @SpecAssertion(section = NAMED_STEREOTYPE, id = "ab") }) public void testProducerMethodQualifiers() { String name = "produceJohn"; Bean<Bug> john = getUniqueBean(Bug.class, new AnnotationLiteral<Funny>() { }); assertEquals(john.getName(), name); assertTrue(annotationSetMatches(john.getQualifiers(), Any.Literal.INSTANCE, Default.Literal.INSTANCE)); }
@Test @SpecAssertion(section = PRODUCER_METHOD_NAME, id = "a") public void testMethodName() { String name = "findTerry"; Bean<Bug> terry = getUniqueBean(Bug.class, new AnnotationLiteral<Crazy>() { }); assertEquals(terry.getName(), name); }
var bug = new Bug("container");
@Test @SpecAssertion(section = PRODUCER_METHOD_NAME, id = "b") public void testJavaBeansPropertyName() { String name = "graham"; Bean<Bug> graham = getUniqueBean(Bug.class); assertEquals(graham.getName(), name); }
var bug = new Bug("container");
var bug = new Bug("container");