Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider ccc58b54 rédigé par Emmanuel STALDER's avatar Emmanuel STALDER
Parcourir les fichiers

Added Javadoc for UnidirectionalAssertion

parent 6feb7c2f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!2Implementation of Assertions in commons-assertions module.
......@@ -11,6 +11,9 @@ public class UnidirectionalAssertion<YOURSELF extends ObjectAssertion<YOURSELF,
return (UnidirectionalAssertion) assertion();
}
/**
* Assert that actual is associated to another object
*/
public YOURSELF isSet() {
if (!actualValue.isSet()) {
check = false;
......@@ -19,6 +22,9 @@ public class UnidirectionalAssertion<YOURSELF extends ObjectAssertion<YOURSELF,
return me();
}
/**
* Assert that actual is not associated to another object
*/
public YOURSELF isNotSet() {
if (actualValue.isSet()) {
check = false;
......@@ -27,6 +33,11 @@ public class UnidirectionalAssertion<YOURSELF extends ObjectAssertion<YOURSELF,
return me();
}
/**
* Assert that actual is associated to a specified object
*
* @param object the object actual should be associated with
*/
public YOURSELF isAssociatedTo(Object object) {
if (actualValue.get() != object) {
check = false;
......@@ -35,6 +46,11 @@ public class UnidirectionalAssertion<YOURSELF extends ObjectAssertion<YOURSELF,
return me();
}
/**
* Assert that actual is not associated to a specified object
*
* @param object the object actual should not be associated with
*/
public YOURSELF isNotAssociatedTo(Object object) {
if (actualValue.get() == object) {
check = false;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter