/*******************************************************************************
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package test.org.apache.kato.anttasks.tck;
import org.apache.kato.anttasks.tck.TCKSetupTask;
import org.apache.tools.ant.BuildException;
import junit.framework.TestCase;
public class TestTCKSetupTask extends TestCase {
public void testNew() {
new TCKSetupTask();
}
public void testSetForkTrue() {
TCKSetupTask task=new TCKSetupTask();
try {
task.setFork(true);
fail("expected BuildException");
} catch(BuildException e) {
; // expected
}
}
public void testSetForkFalse() {
TCKSetupTask task=new TCKSetupTask();
try {
task.setFork(false);
fail("expected BuildException");
} catch(BuildException e) {
; // expected
}
}
public void testSetFailOnerrorTrue() {
TCKSetupTask task=new TCKSetupTask();
try {
task.setFailonerror(true);
fail("expected BuildException");
} catch(BuildException e) {
; // expected
}
}
public void testSetFailOnerrorFalse() {
TCKSetupTask task=new TCKSetupTask();
try {
task.setFailonerror(false);
fail("expected BuildException");
} catch(BuildException e) {
; // expected
}
}
public void testSetClassnameNull() {
TCKSetupTask task=new TCKSetupTask();
try {
task.setClassname(null);
fail("expected BuildException");
} catch(BuildException e) {
; // expected
}
}
public void testSetClassnameSomething() {
TCKSetupTask task=new TCKSetupTask();
try {
task.setClassname("xxx");
fail("expected BuildException");
} catch(BuildException e) {
; // expected
}
}
public void testSetValidateOnlyTrue() {
TCKSetupTask task=new TCKSetupTask();
task.setValidateonly(true);
assertTrue(task.isValidateOnly());
}
public void testSetValidateOnlyFalse() {
TCKSetupTask task=new TCKSetupTask();
task.setValidateonly(false);
assertFalse(task.isValidateOnly());
}
public void testAddEnvVar() {
TCKSetupTask task=new TCKSetupTask();
task.addEnv(null);
}
}