コード例 #1
0
        public void Can_Enter_Partial_Search()
        {
            var bank      = new MockBank();
            var customers = CustomerService.SearchCustomer(bank, "Berg ");

            Assert.Equal(1, customers.Count);
        }
コード例 #2
0
        public void Search_Disregards_Case()
        {
            var bank      = new MockBank();
            var customers = CustomerService.SearchCustomer(bank, "berg");

            Assert.Equal(1, customers.Count);
        }
コード例 #3
0
        public void SearchCustomerTest()
        {
            var bank      = new MockBank();
            var customers = CustomerService.SearchCustomer(bank, "Luleå");

            Assert.Equal(2, customers.Count);
        }
コード例 #4
0
        public void GetCustomerAccountsTest()
        {
            var bank     = new MockBank();
            var accounts = CustomerService.GetCustomerAccounts(bank, 1001);

            Assert.Equal(2, accounts.Count);
        }
コード例 #5
0
        public void GetCustomerTest()
        {
            var bank     = new MockBank();
            var customer = CustomerService.GetCustomer(bank, 1001);

            Assert.Equal("Sweden", customer.Country);
        }
コード例 #6
0
        public void WritesCorrectNumberOfLines()
        {
            var bank   = new MockBank();
            var output = new List <string>();
            var writer = new MockWriter(output);

            CreateFileData.CreateFile(bank, writer);

            Assert.Equal(output.Count, 9);
        }
コード例 #7
0
        public void WritesCorrectFormat()
        {
            var bank   = new MockBank();
            var output = new List <string>();
            var writer = new MockWriter(output);

            CreateFileData.CreateFile(bank, writer);

            Assert.Equal(output[0], "3");
            Assert.Equal(output[1], "1001;559268 - 7528;Berglunds snabbköp;Berguvsvägen  8;Luleå;;S - 958 22;Sweden;0921 - 12 34 65");
            Assert.Equal(output[4], "4");
            Assert.Equal(output[5], "13001;1001;100");
        }