Created
July 1, 2019 01:44
-
-
Save pamuditha/281fead43fd1743c548b3a173a3a0323 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SampleTest extends TestCase{ | |
private Sample sample; | |
public static void main(String args[]) { | |
System.out.println( "main is running ...." ); | |
} | |
@Before | |
public void setUp() throws Exception { | |
this.sample = new Sample(); | |
this.sample.setFirstName( "firstName" ); | |
this.sample.setLastName( "lastName" ); | |
} | |
public void testName() { | |
assertTrue( this.sample.getFirstName().equals( "firstName" ) ); | |
assertTrue( this.sample.getLastName().equals( "lastName" ) ); | |
} | |
@After | |
public void tearDown() throws Exception { | |
this.sample = null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment