示例#1
0
        public void NotEqual_ValuesAreStrings_SpecificValue_Val1NotEqualSpecificValue_ExpectFalse()
        {
            //Arrange
            const string           str   = "Hello World";
            NotEqualModelOfStrings model = new NotEqualModelOfStrings {
                Val1 = str
            };
            //Act
            bool isValid = model.PropertyIsValid("Val1");

            //Assert
            isValid.ShouldBeFalse();
        }
示例#2
0
        public void NotEqual_ValuesAreStrings_SpecificValue_Val1DoesNotNotEqualpecificValue_ExpectTrue()
        {
            //Arrange
            const string           str   = "Goodbye World";
            NotEqualModelOfStrings model = new NotEqualModelOfStrings {
                Val1 = str
            };
            //Act
            bool isValid = model.PropertyIsValid("Val1");

            //Assert
            isValid.ShouldBeTrue();
        }
示例#3
0
        public void NotEqual_ValuesAreStrings_Val1DoesNotEqualVal2_ExpectTrue()
        {
            //Arrange
            const string           str   = "Hello World";
            NotEqualModelOfStrings model = new NotEqualModelOfStrings {
                Val1 = str, Val2 = str + "XXX"
            };
            //Act
            bool isValid = model.PropertyIsValid("Val2");

            //Assert
            isValid.ShouldBeTrue();
        }
示例#4
0
        public void NotEqual_ValuesAreStrings_CompareToCurrentDate_Val3DoesNotEqualCurrentDate_ExpectTrue()
        {
            //Arrange
            string str = "Hello World";
            NotEqualModelOfStrings model = new NotEqualModelOfStrings {
                Val3 = str
            };
            //Act
            bool isValid = model.PropertyIsValid("Val3");

            //Assert
            isValid.ShouldBeTrue();
        }
示例#5
0
        public void NotEqual_ValuesAreStrings_Val1AndVal2BothEmpty_ExpectFalse()
        {
            //Arrange
            const string           str   = "";
            NotEqualModelOfStrings model = new NotEqualModelOfStrings {
                Val1 = str, Val2 = str
            };
            //Act
            bool isValid = model.PropertyIsValid("Val2");

            //Assert
            isValid.ShouldBeFalse();
        }
示例#6
0
        public void NotEqual_ValuesAreStrings_CompareToCurrentDate_Val3NotEqualCurrentDate_ExpectFalse()
        {
            //Arrange
            string str = DateTime.Now.ToShortDateString();
            NotEqualModelOfStrings model = new NotEqualModelOfStrings {
                Val3 = str
            };
            //Act
            bool isValid = model.PropertyIsValid("Val3");

            //Assert
            isValid.ShouldBeFalse();
        }
示例#7
0
        public void NotEqual_ValuesAreStrings_Val1IsEmptyAndVal2IsNot_ExpectTrue()
        {
            //Arrange
            const string           str      = "";
            const string           otherStr = "Other String";
            NotEqualModelOfStrings model    = new NotEqualModelOfStrings {
                Val1 = str, Val2 = otherStr
            };
            //Act
            bool isValid = model.PropertyIsValid("Val2");

            //Assert
            isValid.ShouldBeTrue();
        }
示例#8
0
 public void NotEqual_ValuesAreStrings_Val1NotEqualVal2_ExpectFalse()
 {
     //Arrange
     const string str = "Hello World";
     NotEqualModelOfStrings model = new NotEqualModelOfStrings {Val1 = str, Val2 = str};
     //Act
     bool isValid = model.PropertyIsValid("Val2");
     //Assert
     isValid.ShouldBeFalse();
 }
示例#9
0
 public void NotEqual_ValuesAreStrings_Val1IsEmptyAndVal2IsNot_ExpectTrue()
 {
     //Arrange
     const string str = "";
     const string otherStr = "Other String";
     NotEqualModelOfStrings model = new NotEqualModelOfStrings {Val1 = str, Val2 = otherStr};
     //Act
     bool isValid = model.PropertyIsValid("Val2");
     //Assert
     isValid.ShouldBeTrue();
 }
示例#10
0
 public void NotEqual_ValuesAreStrings_SpecificValue_Val1DoesNotNotEqualpecificValue_ExpectTrue()
 {
     //Arrange
     const string str = "Goodbye World";
     NotEqualModelOfStrings model = new NotEqualModelOfStrings {Val1 = str};
     //Act
     bool isValid = model.PropertyIsValid("Val1");
     //Assert
     isValid.ShouldBeTrue();
 }
示例#11
0
 public void NotEqual_ValuesAreStrings_CompareToCurrentDate_Val3NotEqualCurrentDate_ExpectFalse()
 {
     //Arrange
     string str = DateTime.Now.ToShortDateString();
     NotEqualModelOfStrings model = new NotEqualModelOfStrings {Val3 = str};
     //Act
     bool isValid = model.PropertyIsValid("Val3");
     //Assert
     isValid.ShouldBeFalse();
 }
示例#12
0
 public void NotEqual_ValuesAreStrings_CompareToCurrentDate_Val3DoesNotEqualCurrentDate_ExpectTrue()
 {
     //Arrange
     string str = "Hello World";
     NotEqualModelOfStrings model = new NotEqualModelOfStrings {Val3 = str};
     //Act
     bool isValid = model.PropertyIsValid("Val3");
     //Assert
     isValid.ShouldBeTrue();
 }