Esempio n. 1
0
        public void ThenWillReturnSameIfBothAreUnset()
        {
            var source = new TrainingDateModel();
            var target = new TrainingDateModel();

            Assert.IsTrue(source.Equals(target));
        }
Esempio n. 2
0
        public void ThenWillReturnDifferentIfTargetIsNotSameType()
        {
            var source = new TrainingDateModel {
                StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(1)
            };

            Assert.IsFalse(source.Equals(123));
        }
Esempio n. 3
0
        public void ThenWillReturnSameIfBothDatesAreSetAndEqual()
        {
            var source = new TrainingDateModel {
                StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(1)
            };
            var target = new TrainingDateModel {
                StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(1)
            };

            Assert.IsTrue(source.Equals(target));
        }
Esempio n. 4
0
        public void ThenWillReturnDifferentIfEndDatesAreSetAndNotEqual()
        {
            var source = new TrainingDateModel {
                StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(1)
            };
            var target = new TrainingDateModel {
                StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(2)
            };

            Assert.IsFalse(source.Equals(target));
        }
Esempio n. 5
0
        public void ThenWillReturnSameIfStartDateSetAndEqual()
        {
            var source = new TrainingDateModel {
                StartDate = DateTime.Now
            };
            var target = new TrainingDateModel {
                StartDate = DateTime.Now
            };

            Assert.IsTrue(source.Equals(target));
        }