Skip to content

Instantly share code, notes, and snippets.

@jamesona
Last active September 27, 2018 01:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
public void testSetWeight()
{
float INT_TEST_PRECISION = 0;
// Create a client object using the constructor with 5 parameters.
Client tstClient = new Client("Smith", "Carl", 44, 70, 200);
assertNotNull(tstClient);
// set weight to a new value
tstClient.setWeight(180);
// Verify weight has been set to new value
assertEquals(180, tstClient.getWeight(), INT_TEST_PRECISION);
// set weight to a new value
tstClient.setWeight(150);
// Verify weight has been set to new value
assertEquals(150, tstClient.getWeight(), , INT_TEST_PRECISION);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment