public void Less_ValuesAreDatesAsStrings_SpecificValue_Val1NotLessThanSpecificValue_ExpectFalse() { //Arrange LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val1 = new DateTime(2090, 1, 1).ToShortDateString() }; //Act bool isValid = model.PropertyIsValid("Val1"); //Assert isValid.ShouldBeFalse(); }
public void Less_ValuesAreDatesAsStrings_CompareToCurrentDate_Val3EqualCurrentDate_ExpectFalse() { //Arrange LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val3 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day).ToShortDateString() }; //Act bool isValid = model.PropertyIsValid("Val3"); //Assert isValid.ShouldBeFalse(); }
public void Less_ValuesAreDatesAsStrings_CompareToCurrentDate_Val3NotLessThanCurrentDate_ExpectFalse() { //Arrange LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val3 = DateTime.Now.AddDays(1).ToShortDateString() }; //Act bool isValid = model.PropertyIsValid("Val3"); //Assert isValid.ShouldBeFalse(); }
public void Less_ValuesAreDatesAsStrings_CompareToCurrentDate_Val3EqualCurrentDate_ExpectFalse() { //Arrange LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val3 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day).ToShortDateString() }; //Act bool isValid = model.PropertyIsValid("Val3"); //Assert isValid.ShouldBeFalse(); }
public void Less_ValuesAreDatesAsStrings_CompareToCurrentDate_Val3NotLessThanCurrentDate_ExpectFalse() { //Arrange LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val3 = DateTime.Now.AddDays(1).ToShortDateString() }; //Act bool isValid = model.PropertyIsValid("Val3"); //Assert isValid.ShouldBeFalse(); }
public void Less_ValuesAreDatesAsStrings_SpecificValue_Val1NotLessThanSpecificValue_ExpectFalse() { //Arrange LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val1 = new DateTime(2090, 1, 1).ToShortDateString() }; //Act bool isValid = model.PropertyIsValid("Val1"); //Assert isValid.ShouldBeFalse(); }
public void Less_ValuesAreDatesAsStrings_Val2NotLessThanVal2_ExpectFalse() { //Arrange LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val1 = DateTime.Now.ToShortDateString(), Val2 = DateTime.Now.AddDays(1).ToShortDateString() }; //Act bool isValid = model.PropertyIsValid("Val2"); //Assert isValid.ShouldBeFalse(); }
public void Less_ValuesAreDatesAsStrings_Val1IsNotNullAndVal2IsNull_ExpectTrue() { //Arrange LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val1 = DateTime.Now.ToShortDateString(), Val2 = null }; //Act bool isValid = model.PropertyIsValid("Val2"); //Assert isValid.ShouldBeTrue(); }
public void Less_ValuesAreDatesAsStrings_Val1AndVal2_BothNull_ExpectTrue() { //Arrange LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val1 = null, Val2 = null }; //Act bool isValid = model.PropertyIsValid("Val2"); //Assert isValid.ShouldBeTrue(); }
public void Less_ValuesAreDatesAsStrings_Val2LesssThanVal1_ExpectTrue() { //Arrange DateTime date = DateTime.Now.Date; LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val1 = date.ToShortDateString(), Val2 = date.AddDays(-1).ToShortDateString() }; //Act bool isValid = model.PropertyIsValid("Val2"); //Assert isValid.ShouldBeTrue(); }
public void Less_ValuesAreDatesAsStrings_Val1IsNotNullAndVal2IsNull_ExpectTrue() { //Arrange LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val1 = DateTime.Now.ToShortDateString(), Val2 = null }; //Act bool isValid = model.PropertyIsValid("Val2"); //Assert isValid.ShouldBeTrue(); }
public void Less_ValuesAreDatesAsStrings_Val1AndVal2_BothNull_ExpectTrue() { //Arrange LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val1 = null, Val2 = null }; //Act bool isValid = model.PropertyIsValid("Val2"); //Assert isValid.ShouldBeTrue(); }
public void Less_ValuesAreDatesAsStrings_Val2NotLessThanVal2_ExpectFalse() { //Arrange LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val1 = DateTime.Now.ToShortDateString(), Val2 = DateTime.Now.AddDays(1).ToShortDateString() }; //Act bool isValid = model.PropertyIsValid("Val2"); //Assert isValid.ShouldBeFalse(); }
public void Less_ValuesAreDatesAsStrings_Val2LesssThanVal1_ExpectTrue() { //Arrange DateTime date = DateTime.Now.Date; LessModelOfDatesAsStrings model = new LessModelOfDatesAsStrings { Val1 = date.ToShortDateString(), Val2 = date.AddDays(-1).ToShortDateString() }; //Act bool isValid = model.PropertyIsValid("Val2"); //Assert isValid.ShouldBeTrue(); }