Exemple #1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            this.Set = await _setService.GetSetByIdAsync((int)id);

            if (this.Set == null)
            {
                return(NotFound());
            }

            return(Page());
        }
Exemple #2
0
        public async Task GetSetByIdAsync_WhenCalled_ReturnSetAsync()
        {
            var result = await _setService.GetSetByIdAsync(1);

            Assert.That(result, Is.TypeOf <Set>());
        }