コード例 #1
0
        public void Test_AuditChangeOfAddress_OutputStringContainsCustomerIdOldAddressAndNewAddress()
        {
            //arrange
            int            id         = 1;
            string         oldAddress = "5 Bar Street, Leeds";
            string         newAddress = "New Address";
            Customer       customer   = new Customer(id, oldAddress);
            AuditingSystem system     = new AuditingSystem();

            //act
            string actualValue = system.AuditChangeOfAddress(customer, oldAddress, newAddress);

            //assert
            StringAssert.Contains(customer.Id.ToString(), actualValue);
            StringAssert.Contains(oldAddress, actualValue);
            StringAssert.Contains(newAddress, actualValue);
        }