コード例 #1
0
        public void T3()
        {
            // Arrange
            var validator = new TradeDetailsValidator();

            // Act
            validator.VerifyDates(new DateTime(2020, 11, 12, 20, 20, 00), new DateTime(2020, 11, 11, 12, 34, 00));

            // Assert
            Assert.True(validator.DatesHaveError);
        }
コード例 #2
0
        public void T1()
        {
            // Arrange
            var validator = new TradeDetailsValidator();
            var catcher   = Catcher.For(validator);

            // Act
            validator.VerifyDates(new DateTime(2020, 11, 12, 20, 20, 00), new DateTime(2020, 11, 11, 12, 34, 00));

            // Assert
            catcher.CaughtPropertyChanged(validator, nameof(validator.DatesHaveError));
        }
コード例 #3
0
        public void T5()
        {
            // Arrange
            var validator = new TradeDetailsValidator();

            validator.EntryHasError = false; // Call the verify method

            // Act
            validator.VerifyDates(new DateTime(2020, 11, 11, 20, 20, 00), new DateTime(2020, 11, 11, 12, 34, 00));

            // Assert
            Assert.True(validator.DatesHaveError);
        }