Пример #1
0
        public void IsSatisfiedBy_WhenModifiedBeforeIsBeforeValue_ReturnsTrue()
        {
            var modifiedBefore = DateTime.UtcNow;
            var item           = new TestEntity
            {
                ModifiedOn = modifiedBefore
            };
            var specification = new ModifiedBefore <TestEntity>(modifiedBefore.AddDays(1));
            var satisified    = specification.IsSatisfiedBy(item);

            Assert.IsTrue(satisified);
        }
Пример #2
0
        public void IsSatisfiedBy_WhenModifiedBeforeIsNull_ReturnsFalse()
        {
            var modifiedBefore = DateTime.UtcNow;
            var item           = new TestEntity
            {
                ModifiedOn = null
            };
            var specification = new ModifiedBefore <TestEntity>(modifiedBefore);
            var satisified    = specification.IsSatisfiedBy(item);

            Assert.IsFalse(satisified);
        }