public void And_AllTrue_Null() { // Arrange IConditionModifier modifier = new AndModifier(); // Act Action action = () => modifier.IsConditionMet(true, null); // Assert Assert.ThrowsException<InvalidCastException>(action); }
public void And_AllTrue_Null() { // Arrange IConditionModifier modifier = new AndModifier(); // Act Action action = () => modifier.IsConditionMet(true, null); // Assert Assert.ThrowsException <InvalidCastException>(action); }
public void And_NotAllTrue_Single() { // Arrange bool result; IConditionModifier modifier = new AndModifier(); // Act result = modifier.IsConditionMet(true, false); // Assert Assert.IsFalse(result); }
public void And_AllTrue_Single() { // Arrange bool result; IConditionModifier modifier = new AndModifier(); // Act result = modifier.IsConditionMet(true, true); // Assert Assert.IsTrue(result); }
public void And_AllTrue_Multiple() { // Arrange bool result; var inputs = new[] { true, true, true }; IConditionModifier modifier = new AndModifier(); // Act result = modifier.IsConditionMet(true, inputs.ToArray()); // Assert Assert.IsTrue(result); }
public void And_AllowNullValue_ConditionNotMet() { // Arrange bool result; IConditionModifier modifier = new AndModifier(); modifier.TreatNullAsConditionNotMet = true; // Act result = modifier.IsConditionMet(null, null); // Assert Assert.IsFalse(result); }