import static junit.framework.*; // ------------------------------------------------------------------------- /** * Write a one-sentence summary of your test class here. * Summarize what your test objectives are. * * @author your-pid (and if in lab, partner's pid on same line) * @version (place the date here, in this format: yyyy.mm.dd) */ public class StudentTest extends TestCase { public static void main (String[] args) { TestSuite suite = new TestSuite(); suite.addTest(new StudentTest()); junit.textui.TestRunner.run (suite); } //~ Constructor ........................................................... // ---------------------------------------------------------- /** * Creates a new StudentTest test object. */ public StudentTest() { // The constructor is usually empty in unit tests, since it runs // once for the whole class, not once for each test method. // Per-test initialization should be placed in setUp() instead. } //~ Methods ............................................................... // ---------------------------------------------------------- /** * Sets up the test fixture. * Called before every test case method. */ public void setUp() { /*# Insert your own setup code here */ } // ---------------------------------------------------------- /*# Insert your own test methods here */ public void testName() { Student student1 = new Student(); student1.setName("Manuel"); assertEquals("Manuel", student1.getName()); } }