Пример #1
0
 public void SetUp()
 {
     Matcher = new NullConstraint();
     GoodValues = new object[] { null };
     BadValues = new object[] { "hello" };
     Description = "null";
 }
Пример #2
0
 public void SetUp()
 {
     Matcher     = new NullConstraint();
     GoodValues  = new object[] { null };
     BadValues   = new object[] { "hello" };
     Description = "null";
 }
Пример #3
0
        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);
        }
Пример #5
0
 public void SetUp()
 {
     theConstraint        = new NullConstraint();
     stringRepresentation = "<null>";
     expectedDescription  = "null";
 }
Пример #6
0
 public void SetUp()
 {
     theConstraint = new NullConstraint();
     expectedDescription = "null";
     stringRepresentation = "<null>";
 }
Пример #7
0
        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);
        }
Пример #8
0
        public void Check_WithNonNull_ExpectFalse()
        {
            var constraint = new NullConstraint();

            Assert.IsFalse(constraint.Check("Muttly"));
        }
Пример #9
0
        public void Check_WithNull_ExpectTrue()
        {
            var constraint = new NullConstraint();

            Assert.IsTrue(constraint.Check((string)null));
        }