public void SetUp() { Matcher = new NullConstraint(); GoodValues = new object[] { null }; BadValues = new object[] { "hello" }; Description = "null"; }
public void TestCompareAgainstNormalNullConstraint() { var obj = CreateDestroyedObject(); var result1 = new UnityNullConstraint().ApplyTo(obj).IsSuccess; var result2 = new NullConstraint().ApplyTo(obj).IsSuccess; Assert.That(result1, Is.Not.EqualTo(result2)); }
private void AssertCustomerDropDown(NullConstraint constraint) { var customerDropdown = ReflectionHelper.GetFieldInfoFromInstanceByName(_license, "CustomerID") .GetValue(_license) as DropDownList; Assert.That(customerDropdown, Is.Not.Null); Assert.That(customerDropdown.DataSource, constraint); }
public void SetUp() { theConstraint = new NullConstraint(); stringRepresentation = "<null>"; expectedDescription = "null"; }
public void SetUp() { theConstraint = new NullConstraint(); expectedDescription = "null"; stringRepresentation = "<null>"; }
private void CheckRegionMaskByRecipient(string address, RecipientType recipientType, TestRegion region, TestUser user, NullConstraint constraint, string causeMessage) { var recipient = MailRecipient.Parse(address); Assert.That(recipient, Is.Not.Null); Assert.That(recipient.Type, Is.EqualTo(recipientType)); Assert.That(recipient.Status, Is.EqualTo(RecipientStatus.Verified)); var recipientUsers = recipient.GetUsers(region.Id); var findedUser = recipientUsers.FirstOrDefault(u => u.Id == user.Id); Assert.That(findedUser, constraint, causeMessage); }
public void Check_WithNonNull_ExpectFalse() { var constraint = new NullConstraint(); Assert.IsFalse(constraint.Check("Muttly")); }
public void Check_WithNull_ExpectTrue() { var constraint = new NullConstraint(); Assert.IsTrue(constraint.Check((string)null)); }