You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

GetTest.java 1.8 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright 2000-2001, 2004-2006 The Apache Software Foundation
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. *
  16. */
  17. package org.apache.tools.ant.taskdefs;
  18. import org.apache.tools.ant.BuildFileTest;
  19. /**
  20. */
  21. public class GetTest extends BuildFileTest {
  22. public GetTest(String name) {
  23. super(name);
  24. }
  25. public void setUp() {
  26. configureProject("src/etc/testcases/taskdefs/get.xml");
  27. }
  28. public void tearDown() {
  29. executeTarget("cleanup");
  30. }
  31. public void test1() {
  32. expectBuildException("test1", "required argument missing");
  33. }
  34. public void test2() {
  35. expectBuildException("test2", "required argument missing");
  36. }
  37. public void test3() {
  38. expectBuildException("test3", "required argument missing");
  39. }
  40. public void test4() {
  41. expectBuildException("test4", "src invalid");
  42. }
  43. public void test5() {
  44. expectBuildException("test5", "dest invalid (or no http-server on local machine)");
  45. }
  46. public void test6() {
  47. executeTarget("test6");
  48. }
  49. public void testUseTimestamp() {
  50. executeTarget("testUseTimestamp");
  51. }
  52. public void testUseTomorrow() {
  53. executeTarget("testUseTomorrow");
  54. }
  55. }