Ejemplo n.º 1
0
 @Test
 public void testNormalInitialization() {
   boolean required = true;
   Consent consent = new DefaultConsent(ID_STRING, DESCRIPTION_STRING, required);
   Assert.assertSame(consent.getId(), ID_STRING);
   Assert.assertSame(consent.getDescription(), DESCRIPTION_STRING);
   Assert.assertSame(consent.isRequired(), required);
   Assert.assertSame(consent.getStatus(), ConsentStatus.NOT_SET);
 }
Ejemplo n.º 2
0
 @Test
 public void copiesCorrectly() {
   ConsentStatus status = ConsentStatus.NO;
   boolean required = false;
   Consent original = new DefaultConsent(ID_STRING, DESCRIPTION_STRING, required);
   original.setStatus(status);
   Consent copy = DefaultConsent.copy(original);
   Assert.assertSame(copy.getId(), ID_STRING);
   Assert.assertSame(copy.getDescription(), DESCRIPTION_STRING);
   Assert.assertSame(copy.getStatus(), status);
   Assert.assertSame(copy.isRequired(), required);
 }