public async Task GetCatBySecondaryId_ForSecondaryId_Successful()
        {
            var lastCat = Cats.LastOrDefault();
            var cat     = await CatController.GetBySecondaryId(lastCat.SecondaryId);

            cat.Id.Should().Be(lastCat.Id);
        }
Esempio n. 2
0
        public async Task GetById_ForCatId_Successful()
        {
            var lastCat = Cats.LastOrDefault();
            await ViewModel.GetById(lastCat.Id);

            ViewModel.SelectedCat.Should().Be(lastCat);
            ViewModel.IsCatSelected.Should().BeTrue();
        }
        public async Task GetCatBySecondaryId_ForSecondaryId_Successful()
        {
            var lastCat = Cats.LastOrDefault();
            var result  = await CatController.GetBySecondaryId(lastCat.SecondaryId) as OkObjectResult;

            var cat = result.Value as Cat;

            cat.Id.Should().Be(lastCat.Id);
        }