diff options
Diffstat (limited to 'org.jacoco.report.test/src/org/jacoco/report/internal/html/page/NodePageTest.java')
-rw-r--r-- | org.jacoco.report.test/src/org/jacoco/report/internal/html/page/NodePageTest.java | 162 |
1 files changed, 81 insertions, 81 deletions
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/NodePageTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/NodePageTest.java index c211a23f..00e6d341 100644 --- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/NodePageTest.java +++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/NodePageTest.java @@ -1,81 +1,81 @@ -/*******************************************************************************
- * Copyright (c) 2009, 2012 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marc R. Hoffmann - initial API and implementation
- *
- *******************************************************************************/
-package org.jacoco.report.internal.html.page;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-
-import java.io.IOException;
-
-import org.jacoco.core.analysis.CoverageNodeImpl;
-import org.jacoco.core.analysis.ICoverageNode;
-import org.jacoco.core.analysis.ICoverageNode.ElementType;
-import org.jacoco.report.internal.html.HTMLElement;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Unit tests for {@link NodePage}.
- */
-public class NodePageTest extends PageTestBase {
-
- private CoverageNodeImpl node;
-
- private NodePage<ICoverageNode> page;
-
- private class TestNodePage extends NodePage<ICoverageNode> {
-
- protected TestNodePage(ICoverageNode node, ReportPage parent) {
- super(node, parent, rootFolder, NodePageTest.this.context);
- }
-
- @Override
- protected void content(HTMLElement body) throws IOException {
- }
-
- @Override
- protected String getFileName() {
- return "index.html";
- }
-
- }
-
- @Before
- @Override
- public void setup() throws Exception {
- super.setup();
- node = new CoverageNodeImpl(ElementType.GROUP, "Test");
- page = new TestNodePage(node, null);
- }
-
- @Test
- public void testGetNode() throws IOException {
- assertSame(node, page.getNode());
- }
-
- @Test
- public void testGetLinkLabel() throws IOException {
- assertEquals("Test", page.getLinkLabel());
- }
-
- @Test
- public void testGetLinkStyle1() throws IOException {
- assertEquals("el_report", page.getLinkStyle());
- }
-
- @Test
- public void testGetLinkStyle2() throws IOException {
- final TestNodePage group = new TestNodePage(node, page);
- assertEquals("el_group", group.getLinkStyle());
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2009, 2012 Mountainminds GmbH & Co. KG and Contributors + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Marc R. Hoffmann - initial API and implementation + * + *******************************************************************************/ +package org.jacoco.report.internal.html.page; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertSame; + +import java.io.IOException; + +import org.jacoco.core.analysis.CoverageNodeImpl; +import org.jacoco.core.analysis.ICoverageNode; +import org.jacoco.core.analysis.ICoverageNode.ElementType; +import org.jacoco.report.internal.html.HTMLElement; +import org.junit.Before; +import org.junit.Test; + +/** + * Unit tests for {@link NodePage}. + */ +public class NodePageTest extends PageTestBase { + + private CoverageNodeImpl node; + + private NodePage<ICoverageNode> page; + + private class TestNodePage extends NodePage<ICoverageNode> { + + protected TestNodePage(ICoverageNode node, ReportPage parent) { + super(node, parent, rootFolder, NodePageTest.this.context); + } + + @Override + protected void content(HTMLElement body) throws IOException { + } + + @Override + protected String getFileName() { + return "index.html"; + } + + } + + @Before + @Override + public void setup() throws Exception { + super.setup(); + node = new CoverageNodeImpl(ElementType.GROUP, "Test"); + page = new TestNodePage(node, null); + } + + @Test + public void testGetNode() throws IOException { + assertSame(node, page.getNode()); + } + + @Test + public void testGetLinkLabel() throws IOException { + assertEquals("Test", page.getLinkLabel()); + } + + @Test + public void testGetLinkStyle1() throws IOException { + assertEquals("el_report", page.getLinkStyle()); + } + + @Test + public void testGetLinkStyle2() throws IOException { + final TestNodePage group = new TestNodePage(node, page); + assertEquals("el_group", group.getLinkStyle()); + } + +} |