Esempio n. 1
0
        private void TestPropertyWithNullEquivalent(string Value)
        {
            // Arrange
            var r = new RequiredRule("Test Rule Name");

            // Act
            r.Property(Value);
        }
Esempio n. 2
0
        public void PropertyThrowsExceptionIfPropertyNameIsAlreadySet()
        {
            // Arrange
            var pName = "APropertyName";
            var r     = new RequiredRule("ARuleName").Property(pName);

            // Act
            r.Property(pName);
        }
Esempio n. 3
0
        public void PropertySetsPropertyName()
        {
            // Arrange
            var pName = "PropertyName";

            var r = new RequiredRule("TestRule");

            // Act
            var returnedRule = r.Property(pName);

            // Assert
            Assert.AreSame(r, returnedRule);
            Assert.AreEqual(pName, r.PropertyName);
        }