コード例 #1
0
        public async Task SelectData_GET_InvalidResponse()
        {
            // arrange
            MockLanguageService.Setup_GetLanguages_Returns_LanguageReadListResponse_Invalid();

            // act
            var result = await SystemUnderTest.SelectData(UidOne);

            // assert
            MockLanguageService.Verify_GetLanguages();
            AssertView <JsonResult>(result);
        }
コード例 #2
0
        public void ListData_GET_InvalidResponse()
        {
            // arrange
            MockLanguageService.Setup_GetLanguages_Returns_LanguageReadListResponse_Invalid();

            // act
            var result = SystemUnderTest.ListData(One, Two);

            // assert
            AssertView <NotFoundResult>(result);
            MockLanguageService.Verify_GetLanguages();
        }
コード例 #3
0
        public void SelectData_GET()
        {
            // arrange
            MockLanguageService.Setup_GetLanguages_Returns_LanguageReadListResponse_Success();

            // act
            var result = SystemUnderTest.SelectData(UidOne);

            // assert
            AssertView <JsonResult>(result);
            MockLanguageService.Verify_GetLanguages();
        }
コード例 #4
0
        public void ListData_GET()
        {
            // arrange
            MockLanguageService.Setup_GetLanguages_Returns_LanguageReadListResponse_Success();

            // act
            var result = SystemUnderTest.ListData(One, Two);

            // assert
            AssertViewAndHeaders(result, new[] { "language_name", "2_char_code", "3_char_code", "icon", "" });
            MockLanguageService.Verify_GetLanguages();
        }