public void NotEqualTo_CustomIComparableImplementation_InvalidType_ArgumentTypeMismatch() { // Arrange IConditionModifier modifier = new NotEqualToModifier(); // Act Action action = () => modifier.IsConditionMet("foo", new CustomIComparableImplementation(15)); // Assert Assert.ThrowsException <ArgumentException>(action); }
public void NotEqualTo_Bool_InvalidType_ArgumentTypeMismatch() { // Arrange IConditionModifier modifier = new NotEqualToModifier(); // Act Action action = () => modifier.IsConditionMet("foo", false); // Assert Assert.ThrowsException<ArgumentException>(action); }
public void NotEqualTo_Bool_InvalidType_ArgumentTypeMismatch() { // Arrange IConditionModifier modifier = new NotEqualToModifier(); // Act Action action = () => modifier.IsConditionMet("foo", false); // Assert Assert.ThrowsException <ArgumentException>(action); }
public void NotEqualTo_InvalidCast() { // Arrange IConditionModifier modifier = new NotEqualToModifier(); // Act Action action = () => modifier.IsConditionMet(null, null); // Assert Assert.ThrowsException <InvalidCastException>(action); }
public void NotEqualTo_Int32_True() { // Arrange bool result; IConditionModifier modifier = new NotEqualToModifier(); // Act result = modifier.IsConditionMet(12, 15); // Assert Assert.IsTrue(result); }
public void NotEqualTo_CustomIComparableImplementation_False() { // Arrange bool result; IConditionModifier modifier = new NotEqualToModifier(); // Act result = modifier.IsConditionMet(new CustomIComparableImplementation(15), new CustomIComparableImplementation(15)); // Assert Assert.IsFalse(result); }
public void NotEqualTo_Bool_False() { // Arrange bool result; IConditionModifier modifier = new NotEqualToModifier(); // Act result = modifier.IsConditionMet(false, false); // Assert Assert.IsFalse(result); }
public void NotEqualTo_String_False() { // Arrange bool result; IConditionModifier modifier = new NotEqualToModifier(); // Act result = modifier.IsConditionMet("bar", "bar"); // Assert Assert.IsFalse(result); }
public void NotEqualTo_DateTime_False() { // Arrange bool result; IConditionModifier modifier = new NotEqualToModifier(); // Act result = modifier.IsConditionMet(DateTime.MinValue, DateTime.MinValue); // Assert Assert.IsFalse(result); }
public void NotEqualTo_Bool_True() { // Arrange bool result; IConditionModifier modifier = new NotEqualToModifier(); // Act result = modifier.IsConditionMet(true, false); // Assert Assert.IsTrue(result); }
public void NotEqualTo_Double_False() { // Arrange bool result; IConditionModifier modifier = new NotEqualToModifier(); // Act result = modifier.IsConditionMet(15.0, 15.0); // Assert Assert.IsFalse(result); }
public void NotEqualTo_AllowNullValue_ConditionNotMet() { // Arrange bool result; IConditionModifier modifier = new NotEqualToModifier(); modifier.TreatNullAsConditionNotMet = true; // Act result = modifier.IsConditionMet(null, null); // Assert Assert.IsFalse(result); }
public void NotEqualTo_CustomIComparableImplementation_InvalidType_ArgumentTypeMismatch() { // Arrange IConditionModifier modifier = new NotEqualToModifier(); // Act Action action = () => modifier.IsConditionMet("foo", new CustomIComparableImplementation(15)); // Assert Assert.ThrowsException<ArgumentException>(action); }
public void NotEqualTo_DateTime_True() { // Arrange bool result; IConditionModifier modifier = new NotEqualToModifier(); // Act result = modifier.IsConditionMet(DateTime.MaxValue, DateTime.MinValue); // Assert Assert.IsTrue(result); }
public void NotEqualTo_InvalidCast() { // Arrange IConditionModifier modifier = new NotEqualToModifier(); // Act Action action = () => modifier.IsConditionMet(null, null); // Assert Assert.ThrowsException<InvalidCastException>(action); }
public void NotEqualTo_String_True() { // Arrange bool result; IConditionModifier modifier = new NotEqualToModifier(); // Act result = modifier.IsConditionMet("foo", "bar"); // Assert Assert.IsTrue(result); }