Package org.adoptopenjdk.jitwatch.model

Examples of org.adoptopenjdk.jitwatch.model.Tag


    TagProcessor tp = new TagProcessor();

    int count = 0;

    Tag tag = null;

    for (String line : lines)
    {
      tag = tp.processLine(line);
      if (count++ < lines.length - 1)
      {
        assertNull(tag);
      }
    }

    assertNotNull(tag);

    List<Tag> children = tag.getNamedChildren("b");
    assertEquals(3, children.size());

    Tag firstChild = tag.getFirstNamedChild("b");
    assertEquals("2", firstChild.getAttribute("foo"));
    assertEquals("baz", firstChild.getAttribute("bar"));

    List<Tag> childrenWithAttr = tag.getNamedChildrenWithAttribute("b", "bar", "baz");
    assertEquals(1, childrenWithAttr.size());
  }
View Full Code Here


    TagProcessor tp = new TagProcessor();

    int count = 0;

    Tag tag = null;

    for (String line : lines)
    {
      tag = tp.processLine(line);

      if (count++ < lines.length - 1)
      {
        assertNull(tag);
      }
    }

    assertNotNull(tag);

    assertEquals(TAG_VM_VERSION, tag.getName());
   
    List<Tag> children = tag.getChildren();
   
    assertEquals(3, children.size());

    Tag tagRelease = children.get(1);
   
    assertEquals(TAG_RELEASE, tagRelease.getName())
    assertEquals(line5, tagRelease.getTextContent());
  }
View Full Code Here

    TagProcessor tp = new TagProcessor();

    int count = 0;

    Tag tag = null;

    for (String line : lines)
    {
      tag = tp.processLine(line);

      if (count++ < lines.length - 1)
      {
        assertNull(tag);
      }
    }

    assertNotNull(tag);

    assertEquals(TAG_VM_VERSION, tag.getName());
   
    List<Tag> children = tag.getChildren();
   
    assertEquals(4, children.size());
   
    Tag tagTweakVM = children.get(0);
   
    assertEquals(TAG_TWEAK_VM, tagTweakVM.getName())
    assertEquals(null, tagTweakVM.getTextContent());

    Tag tagRelease = children.get(2);
   
    assertEquals(TAG_RELEASE, tagRelease.getName())
    assertEquals(line6, tagRelease.getTextContent());
  }
View Full Code Here

            Then no tag objects are returned
     */
    @Test
    public void givenAnUndefinedLineIsAvailable_WhenTheTagProcessorProcessesIt_ThenNoTagsAreReturned() {
        // Given
        Tag expectedParseResult = null;
        String line = null;

        // When
        TagProcessor tagProcessor = new TagProcessor();
        Tag actualParseResult = tagProcessor.processLine(line);

        // Then
        assertThat("No tags should have been returned.",
                actualParseResult,
                is(equalTo(expectedParseResult)));
View Full Code Here

            Then no tag objects are returned
     */
    @Test
    public void givenAThreeCharatersLineStartingWithOpenBracket_WhenTheTagProcessorActionsIt_ThenNoTagsAreReturned() {
        // Given
        Tag expectedParseResult = null;
        String lineWith3LettersStartingWithOpenAngleBracket =
                JITWatchConstants.C_OPEN_ANGLE + "12";

        // When
        TagProcessor tagProcessor = new TagProcessor();
        Tag actualParseResult = tagProcessor.processLine(lineWith3LettersStartingWithOpenAngleBracket);

        // Then
        assertThat("No tags should have been returned.",
                actualParseResult,
                is(equalTo(expectedParseResult)));
View Full Code Here

TOP

Related Classes of org.adoptopenjdk.jitwatch.model.Tag

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.