Skip to content

Instantly share code, notes, and snippets.

@jamesona
Last active September 27, 2018 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesona/cc283f00de7659b25cf26c16b0b26e82 to your computer and use it in GitHub Desktop.
Save jamesona/cc283f00de7659b25cf26c16b0b26e82 to your computer and use it in GitHub Desktop.
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