コード例 #1
0
        public void TestVacatingBefore_ReturnTrue_IfVacatingDateLessThanGivenDate()
        {
            var tenant = new TenantEntity { VacatingDate = new DateTime(2000, 1, 1) };

            bool result = tenant.VacatingBefore(new DateTime(2000, 1, 2));

            Assert.IsTrue(result);
        }
コード例 #2
0
        public void TestVacatingBefore_ShouldIgnoreTime()
        {
            var tenant = new TenantEntity { VacatingDate = new DateTime(2000, 1, 1, 1, 0, 0) };

            bool result = tenant.VacatingBefore(new DateTime(2000, 1, 1, 12, 0, 0));

            Assert.IsFalse(result);
        }
コード例 #3
0
        public void TestVacatingBefore_ReturnFalse_IfVacatingDateIsNull()
        {
            var tenant = new TenantEntity { VacatingDate = null };

            bool result = tenant.VacatingBefore(new DateTime(2000, 1, 1));

            Assert.IsFalse(result);
        }