Exemple #1
0
        public void Test_TextField_Returns_Matching_DateString()
        {
            var dateFieldVM = new DateFieldVM();

            dateFieldVM.ParsedDate = DateTime.Parse("12-03-2019");

            Assert.Equal("12-03-2019", dateFieldVM.TextField);
        }
Exemple #2
0
        public void Test_IsValid_Returns_True_If_ParsedDateField_Is_Valid()
        {
            var dateFieldVM = new DateFieldVM();

            dateFieldVM.ParsedDate = DateTime.Parse("12-03-2019");

            Assert.True(dateFieldVM.IsValid);
        }
Exemple #3
0
        public void Test_BorderColor_Returns_Green_If_ParsedDateField_Is_Valid()
        {
            var dateFieldVM = new DateFieldVM();

            dateFieldVM.ParsedDate = DateTime.Parse("12-03-2019");

            Assert.Equal(Colors.Green, dateFieldVM.BorderColor.Color);
        }
Exemple #4
0
        public void Test_IsValid_Returns_False_If_ParsedDateField_Is_InValid()
        {
            var dateFieldVM = new DateFieldVM();

            Assert.False(dateFieldVM.IsValid);
        }
Exemple #5
0
        public void Test_BorderColor_Returns_Red_If_ParsedDateField_Is_InValid()
        {
            var dateFieldVM = new DateFieldVM();

            Assert.Equal(Colors.Red, dateFieldVM.BorderColor.Color);
        }