コード例 #1
0
        public async Task <IActionResult> Index()
        {
            CoursesCounterResponse response = await _finder.Find();

            return(Ok(new Dictionary <string, int>()
            {
                { "total", response.Total }
            }));
        }
コード例 #2
0
        public async Task it_should_find_an_existing_courses_counter()
        {
            CoursesCounter         counter  = CoursesCounterMother.Random();
            CoursesCounterResponse response = CoursesCounterResponseMother.Create(counter.Total.Value);

            ShouldSearch(counter);

            Assert.Equal(response, await _finder.Find());
        }