Debian Codegraph @

jacoco-maven-plugin.test/it/it-check-fails-no-halt/verify.bsh

raw
1 /*******************************************************************************
2 * Copyright (c) 2009, 2025 Mountainminds GmbH & Co. KG and Contributors
3 * This program and the accompanying materials are made available under
4 * the terms of the Eclipse Public License 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-2.0
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *
9 * Contributors:
10 * Evgeny Mandrikov - initial API and implementation
11 * Kyle Lieber - implementation of CheckMojo
12 *
13 *******************************************************************************/
14 import java.io.*;
15 import org.codehaus.plexus.util.*;
16
17 String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
18 if ( buildLog.indexOf( "Coverage checks have not been met." ) < 0 ) {
19 throw new RuntimeException( "Coverage checks should not have been met." );
20 }
21
22 if ( buildLog.indexOf( "methods missed count is 1, but expected maximum is 0" ) < 0 ) {
23 throw new RuntimeException( "Should have displayed insufficient code coverage messages." );
24 }