Skip to content

Instantly share code, notes, and snippets.

@pamuditha
Created July 1, 2019 01:44
Show Gist options
  • Save pamuditha/281fead43fd1743c548b3a173a3a0323 to your computer and use it in GitHub Desktop.
Save pamuditha/281fead43fd1743c548b3a173a3a0323 to your computer and use it in GitHub Desktop.
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