1 /******************************************************************************* 2 * Copyright (c) 2009, 2018 Mountainminds GmbH & Co. KG and Contributors 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * Evgeny Mandrikov - initial API and implementation 10 * 11 *******************************************************************************/ 12 package org.jacoco.core.test.validation; 13 14 import org.jacoco.core.analysis.ICounter; 15 import org.jacoco.core.test.validation.targets.EnumImplicitMethods; 16 import org.junit.Test; 17 18 /** 19 * Test of an implicit methods and static initializer in enums. 20 */ 21 public class EnumImplicitMethodsTest extends ValidationTestBase { 22 23 public EnumImplicitMethodsTest() { 24 super(EnumImplicitMethods.class); 25 } 26 27 @Test 28 public void testCoverageResult() { 29 assertMethodCount(5); 30 31 assertLine("classdef", ICounter.FULLY_COVERED); 32 assertLine("customValueOfMethod", ICounter.NOT_COVERED); 33 assertLine("customValuesMethod", ICounter.NOT_COVERED); 34 35 assertLine("const", ICounter.PARTLY_COVERED); 36 assertLine("staticblock", ICounter.FULLY_COVERED); 37 assertLine("super", ICounter.FULLY_COVERED); 38 assertLine("constructor", ICounter.FULLY_COVERED); 39 } 40 41 } 42