Package noop.model

Examples of noop.model.Clazz


  @Test
  public void shouldCreateVerticesForEveryElementUnderAProject() {
    Project p = new Project("example", "p", "MIT license");
    UUID uid = UUID.randomUUID();
    Library l = new Library(uid, "l");
    Clazz c = new Clazz("c");
    Method m = new Method("m");
    Library l2 = new Library(UUID.randomUUID(), "l2");

    p.addLibrary(l);
    p.addLibrary(l2);
    l.addClazz(c);
    c.addBlock(m);

    p.accept(new VertexCreatingVisitor());

    assertEquals(l, l.getElements().get(0));
    assertEquals(c, l.getElements().get(1));
View Full Code Here


    noop = new Project("Noop", "com.google", "Apache 2");

    lang = new Library(UUID.randomUUID(), "lang");
    noop.addLibrary(lang);

    stringClazz = new Clazz("String");
    lang.addClazz(stringClazz);

    voidClazz = new Clazz("Void");
    lang.addClazz(voidClazz);

    io = new Library(UUID.randomUUID(), "io");
    noop.addLibrary(io);

    consoleClazz = new Clazz("Console");
    io.addClazz(consoleClazz);

    printMethod = new Method("print");
    consoleClazz.addBlock(printMethod);

    Parameter printArg = new Parameter("s");
    printMethod.addParameter(printArg);

    booleanClazz = new Clazz("Boolean");
    lang.addClazz(booleanClazz);

    intClazz = new Clazz("Integer");
    lang.addClazz(intClazz);

    integerPlus = new Method("+");
    intClazz.addBlock(integerPlus);
    intClazz.addComment(new Comment("Elements may have symbols in their names." +
View Full Code Here

TOP

Related Classes of noop.model.Clazz

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.