Пример #1
0
            public void BadCustomerId_ReturnsNull()
            {
                // arrange
                IMandatoryItemsListLogic testunit    = MakeTestsObject();
                UserSelectedContext      testcontext = new UserSelectedContext {
                    BranchId   = "FUT",
                    CustomerId = "223456"
                };
                UserProfile fakeUser = new UserProfile();

                // act
                ListModel results = testunit.ReadList(fakeUser, testcontext, false);

                // assert
                results.Should()
                .BeNull();
            }
Пример #2
0
            public void GoodCustomerIdAndBranch_ReturnsExpectedList()
            {
                // arrange
                IMandatoryItemsListLogic testunit    = MakeTestsObject();
                UserSelectedContext      testcontext = new UserSelectedContext {
                    BranchId   = "FUT",
                    CustomerId = "123456"
                };

                int         expected = 1;
                UserProfile fakeUser = new UserProfile();

                // act
                ListModel results = testunit.ReadList(fakeUser, testcontext, false);

                // assert
                results.ListId
                .Should()
                .Be(expected);
            }