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

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

            Assert.IsFalse(source.Equals(123));
        }
Ejemplo 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));
        }
Ejemplo 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));
        }
Ejemplo 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));
        }