1 16 17 package org.apache.taglibs.standard; 18 19 import junit.framework.*; 20 21 public class TestVersion 22 extends TestCase { 23 private Version version = null; 24 25 public TestVersion(String name) { 26 super(name); 27 } 28 29 protected void setUp() throws Exception { 30 super.setUp(); 31 version = new Version(); 32 } 33 34 protected void tearDown() throws Exception { 35 version = null; 36 super.tearDown(); 37 } 38 39 public void testVersion() { 40 version = new Version(); 41 } 42 43 public void testGetDevelopmentVersionNum() { 44 int expectedReturn = 0; 45 int actualReturn = version.getDevelopmentVersionNum(); 46 assertEquals("return value", expectedReturn, actualReturn); 47 } 48 49 public void testGetMaintenanceVersionNum() { 50 int expectedReturn = 2; 51 int actualReturn = version.getMaintenanceVersionNum(); 52 assertEquals("return value", expectedReturn, actualReturn); 53 } 54 55 public void testGetMajorVersionNum() { 56 int expectedReturn = 1; 57 int actualReturn = version.getMajorVersionNum(); 58 assertEquals("return value", expectedReturn, actualReturn); 59 } 60 61 public void testGetProduct() { 62 String expectedReturn = "standard-taglib"; 63 String actualReturn = version.getProduct(); 64 assertEquals("return value", expectedReturn, actualReturn); 65 } 66 67 public void testGetReleaseVersionNum() { 68 int expectedReturn = 1; 69 int actualReturn = version.getReleaseVersionNum(); 70 assertEquals("return value", expectedReturn, actualReturn); 71 } 72 73 public void testGetVersion() { 74 String expectedReturn = "standard-taglib 1.1.2"; 75 String actualReturn = version.getVersion(); 76 assertEquals("return value", expectedReturn, actualReturn); 77 } 78 79 public void testMain() { 80 String [] argv = null; 81 version.main(argv); 82 } 83 84 } 85 | Popular Tags |