コード例 #1
0
        public void CanCreateLateAccount()
        {
            var account = AccountBuilder.DefaultAccount()
                          .WithLatePaymentStatus()
                          .Build();

            Assert.IsTrue(account.DueDate < DateTime.Now);
        }
コード例 #2
0
        public void CanCreateLateAccountWithVipCustomer()
        {
            var account = AccountBuilder.DefaultAccount()
                          .WithLatePaymentStatus()
                          .WithVipCustomer()
                          .Build();

            Assert.IsTrue(account.Customer.IsVip);
        }
コード例 #3
0
        public void AssignsDefaultValues()
        {
            var account = AccountBuilder.DefaultAccount().Build();

            Assert.IsTrue(account.Balance > 0);
            Assert.IsTrue(account.DueDate > DateTime.Now);
            Assert.IsNotNull(account.Customer.Address.City);
            Assert.IsNotNull(account.Customer.Address.Country);
            Assert.IsFalse(account.Customer.IsVip);
            Assert.IsNotNull(account.Customer.Name);
        }
コード例 #4
0
        public void CanCreateAccount()
        {
            var account = AccountBuilder.DefaultAccount().Build();

            Assert.IsNotNull(account);
        }