Beispiel #1
0
        public void ExcluirPetshopTeste()
        {
            var psService = new PetshopService();

            var psExcluir = psService.ListarPetshops().ElementAt(0);

            psService.ExcluirPetshop(psExcluir);

            Assert.NotNull(psExcluir);
            Assert.DoesNotContain(psExcluir, psService.ListarPetshops());
        }
Beispiel #2
0
        public void EditarPetshopTeste()
        {
            var psService = new PetshopService();

            var psEditar  = psService.ListarPetshops().ElementAt(0);
            var psEditada = new Petshop("PetshopEditada", 10, 10, 20, 20, 0.7);

            var editou = psService.EditarPetshop(psEditar, psEditada);

            Assert.True(editou);
            Assert.Contains(psEditada, psService.ListarPetshops());
        }
Beispiel #3
0
        public void ListarPetshopsTeste()
        {
            var psService = new PetshopService();
            var lista     = psService.ListarPetshops();

            Assert.NotNull(lista);
        }
Beispiel #4
0
        public void BuscarPetshopTeste()
        {
            var psService = new PetshopService();

            var psBuscar = psService.ListarPetshops().ElementAtOrDefault(0).Nome;

            var psEncontrada = psService.BuscarPetshop(psBuscar);

            Assert.NotNull(psBuscar);
            Assert.Equal(psBuscar, psEncontrada.Nome);
        }