diff --git a/sonar-dependency-check-plugin/src/test/java/org/sonar/dependencycheck/page/DependencyCheckReportPageTest.java b/sonar-dependency-check-plugin/src/test/java/org/sonar/dependencycheck/page/DependencyCheckReportPageTest.java new file mode 100644 index 00000000..7d0acfc3 --- /dev/null +++ b/sonar-dependency-check-plugin/src/test/java/org/sonar/dependencycheck/page/DependencyCheckReportPageTest.java @@ -0,0 +1,43 @@ +/* + * Dependency-Check Plugin for SonarQube + * Copyright (C) 2015-2019 dependency-check + * philipp.dallig@gmail.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.dependencycheck.page; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; + +import org.junit.jupiter.api.Test; +import org.sonar.api.web.page.Context; +import org.sonar.api.web.page.Page; + +class DependencyCheckReportPageTest { + + @Test + void testPage() { + DependencyCheckReportPage reportPage = new DependencyCheckReportPage(); + Context context = new Context(); + reportPage.define(context); + System.out.println(context.getPages().size()); + Page report_page = context.getPages().iterator().next(); + assertEquals("Dependency-Check", report_page.getName()); + assertEquals("dependencycheck/report_page", report_page.getKey()); + assertFalse(report_page.isAdmin()); + } + +}