Пример #1
0
        public void Then_The_Url_Is_Correctly_Built(int courseId, double latitude, double longitude, int sortOrder, string sectorSubjectArea, Guid?shortlistUserId)
        {
            var level  = 1;
            var actual = new GetProvidersByCourseRequest(courseId, sectorSubjectArea, level, latitude, longitude, sortOrder, shortlistUserId);

            actual.GetUrl.Should().Be($"api/courses/{courseId}/providers?lat={latitude}&lon={longitude}&sortOrder={sortOrder}&sectorSubjectArea={sectorSubjectArea}&level={level}&shortlistUserId={shortlistUserId}");
        }
Пример #2
0
        public void Then_The_Url_Is_Correctly_Built_With_No_Location(int courseId, string sectorSubjectArea)
        {
            var level  = 1;
            var actual = new GetProvidersByCourseRequest(courseId, sectorSubjectArea, level);

            actual.GetUrl.Should().Be($"api/courses/{courseId}/providers?lat=&lon=&sortOrder=0&sectorSubjectArea={sectorSubjectArea}&level={level}&shortlistUserId=");
        }
        public void Then_The_Url_Is_Correctly_Built(string baseUrl, int courseId)
        {
            var actual = new GetProvidersByCourseRequest(courseId)
            {
                BaseUrl = baseUrl
            };

            actual.GetUrl.Should().Be($"{baseUrl}api/courses/{courseId}/providers");
        }
Пример #4
0
        public void Then_Maps_The_Level_Correctly(int level, string expectedLevel, int courseId, string sectorSubjectArea)
        {
            var actual = new GetProvidersByCourseRequest(courseId, sectorSubjectArea, level);

            actual.GetUrl.Should().Be($"api/courses/{courseId}/providers?lat=&lon=&sortOrder=0&sectorSubjectArea={sectorSubjectArea}&level={expectedLevel}&shortlistUserId=");
        }