コード例 #1
0
        public void TestGetBranchesNullParam()
        {
            var           mock          = new Mock <IRequestSender>();
            BranchService branchService = new BranchService(mock.Object);
            ClientResponse <IEnumerable <Branch> > testResponse =
                branchService.GetBranchList((BasicRepositoryData)null).GetAwaiter().GetResult();

            Assert.Equal(MessagesHelper.EmptyDataMessage, testResponse.Message);
            Assert.Equal(OperationStatus.EmptyData, testResponse.Status);
        }
コード例 #2
0
        public void TestGetBranchesIfrepoNameEmpty()
        {
            var           mock          = new Mock <IRequestSender>();
            BranchService branchService = new BranchService(mock.Object);
            ClientResponse <IEnumerable <Branch> > testResponse =
                branchService.GetBranchList("username", string.Empty).GetAwaiter().GetResult();

            Assert.Equal(MessagesHelper.EmptyDataMessage, testResponse.Message);
            Assert.Equal(OperationStatus.EmptyData, testResponse.Status);
        }