예제 #1
0
        public void Should_return_JSON_string_when_search_by_last_name_returns_multiple()
        {
            // Given
            dynamic expected = CreateExpectedJsonStringForSearchForSmith();
            Browser browser  = CreateBrowser();

            // When
            BrowserResponse result = browser.Get("/doctors/byLastName/Smith",
                                                 with =>
            {
                with.HttpRequest();
            });

            dynamic actual = XUnitDoctorsHelper.ToDynamic(result.Body.AsString());

            // Then
            XUnitDoctorsHelper.AssertDoctors(expected,
                                             actual);
        }
예제 #2
0
        public void Should_return_JSON_string_when_list_requested()
        {
            // Given
            dynamic expected = CreateExpectedJsonStringForList();
            Browser browser  = CreateBrowser();

            // When
            BrowserResponse result = browser.Get("/doctors/",
                                                 with =>
            {
                with.HttpRequest();
            });

            dynamic actual = XUnitDoctorsHelper.ToDynamic(result.Body.AsString());

            // Then
            XUnitDoctorsHelper.AssertDoctors(expected,
                                             actual);
        }