001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: *
017: */
018: package org.apache.tools.ant.taskdefs.optional;
019:
020: import org.apache.tools.ant.BuildFileTest;
021:
022: /**
023: * Tests the Dotnet tasks, based off WsdlToDotnetTest
024: *
025: * @since Ant 1.6
026: */
027: public class DotnetTest extends BuildFileTest {
028:
029: /**
030: * Description of the Field
031: */
032: private final static String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/";
033:
034: /**
035: * Constructor
036: *
037: * @param name testname
038: */
039: public DotnetTest(String name) {
040: super (name);
041: }
042:
043: /**
044: * The JUnit setup method
045: */
046: public void setUp() {
047: configureProject(TASKDEFS_DIR + "dotnet.xml");
048: }
049:
050: /**
051: * The teardown method for JUnit
052: */
053: public void tearDown() {
054: executeTarget("teardown");
055: }
056:
057: /**
058: * A unit test for JUnit
059: */
060: public void testCSC() throws Exception {
061: executeTarget("testCSC");
062: }
063:
064: /**
065: * A unit test for JUnit
066: */
067: public void testCSCintrinsicFileset() throws Exception {
068: executeTarget("testCSCintrinsicFileset");
069: }
070:
071: /**
072: * A unit test for JUnit
073: */
074: public void testCSCdll() throws Exception {
075: executeTarget("testCSCdll");
076: }
077:
078: /**
079: * A unit test for JUnit
080: */
081: public void testCscReferences() throws Exception {
082: executeTarget("testCscReferences");
083: }
084:
085: /**
086: * A unit test for JUnit
087: */
088: public void testCscResources() throws Exception {
089: executeTarget("testCSCResources");
090: }
091:
092: /**
093: * test we can assemble
094: */
095: public void testILASM() throws Exception {
096: executeTarget("testILASM");
097: }
098:
099: /**
100: * test we can disassemble
101: */
102: public void testILDASM() throws Exception {
103: executeTarget("testILDASM");
104: }
105:
106: /**
107: * test we can disassemble
108: */
109: public void testILDASM_empty() throws Exception {
110: expectBuildExceptionContaining("testILDASM_empty",
111: "parameter validation", "invalid");
112: }
113:
114: /**
115: * test we can handle jsharp (if found)
116: */
117: public void testJsharp() throws Exception {
118: executeTarget("jsharp");
119: }
120:
121: /**
122: * test we can handle jsharp (if found)
123: */
124: public void testResponseFile() throws Exception {
125: executeTarget("testCSCresponseFile");
126: }
127:
128: }
|