1 package com.oracle.appbundlers.tests.functionality; 2 3 import static com.oracle.appbundlers.utils.BundlerUtils.EXE; 4 5 import java.io.IOException; 6 import java.util.HashMap; 7 import java.util.Map; 8 9 import com.oracle.appbundlers.tests.functionality.functionalinterface.AdditionalParams; 10 import com.oracle.appbundlers.utils.BundlerUtils; 11 import com.oracle.appbundlers.utils.BundlingManagers; 12 import com.oracle.appbundlers.utils.ExtensionType; 13 import com.oracle.tools.packager.Bundler; 14 15 /** 16 * @author Dmitry Ginzburg <dmitry.x.ginzburg@oracle.com> 17 * @author Dmitry Zinkevich <dmitry.zinkevich@oracle.com> 18 */ 19 20 /** 21 * The test is designed to ensure that ConfigException is thrown when it's 22 * needed 23 */ 24 public class ConfigExceptionTest extends TestBase { 25 @Override 26 protected boolean isConfigExceptionExpected(Bundler bundler) { 27 return true; 28 } 29 30 public AdditionalParams getAdditionalParams() { 31 return () -> { 32 Map<String, Object> additionalParams = new HashMap<>(); 33 additionalParams.put(COPYRIGHT, 34 "Copyright (c) 2014, 2016 Oracle and/or its affiliates. All rights reserved." 35 + " DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER."); 36 return additionalParams; 37 }; 38 } 39 40 @Override 41 protected BundlingManagers[] getBundlingManagers() { 42 return new BundlingManagers[] { BundlingManagers.JAVA_API }; 43 } 44 45 @Override 46 protected BundlerUtils[] getBundlerUtils() { 47 return new BundlerUtils[] { EXE }; 48 } 49 50 @Override 51 public void overrideParameters(ExtensionType intermediate) 52 throws IOException { 53 this.currentParameter.setAdditionalParams(getAdditionalParams()); 54 } 55 }