public void UpdateSaborRepositoryTest()
        {
            //Arrange
            ISaborRepository repository = new SaborRepository();
            //Trufa trufa = _contextForTest.Trufas.Find(1);
            //trufa.DataFabricacao = new DateTime(2015, 06, 01);
            //trufa.DataValidade = new DateTime(2015, 06, 11);
            //trufa.Quantidade = 5;
            //trufa.Tamanho = "Grande";
            //trufa.Valor = 3.00;

            Sabor sabor = _contextForTest.Sabores.Find(1);
            sabor.NameSabor = "Brigadeiro";
            //sabor.Trufa = trufa;

            //Action
            var updatedSabor = repository.Update(sabor);

            //Assert
            var persistedSabor = _contextForTest.Sabores.Find(1);
            Assert.IsNotNull(updatedSabor);
            Assert.AreEqual(updatedSabor.Id, persistedSabor.Id);
            Assert.AreEqual(updatedSabor.NameSabor, persistedSabor.NameSabor);
            //Assert.AreEqual(updatedSabor.Trufa, persistedSabor.Trufa);
        }
        public void DeleteSaborRepositoryTest()
        {
            //Arrange
            ISaborRepository repository = new SaborRepository();

            //Action
            var deletedSabor = repository.Delete(1);

            //Assert
            var persistedSabor = _contextForTest.Sabores.FirstOrDefault(x => x.Id == 1);
            Assert.IsNull(persistedSabor);
        }
        public void CreateSaborRepositoryTest()
        {
            //Arrange
            Sabor s = ObjectMother.GetSabor();
            ISaborRepository repository = new SaborRepository();

            //Action
            Sabor newSabor = repository.Save(s);

            //Assert
            Assert.IsTrue(newSabor.Id > 0);
        }
        public void RetrieveSaborRepositoryTest()
        {
            //Arrange
            ISaborRepository repository = new SaborRepository();

            //Action
            Sabor sabor = repository.Get(1);

            //Assert
            Assert.IsNotNull(sabor);
            Assert.IsTrue(sabor.Id > 0);
            Assert.IsFalse(string.IsNullOrEmpty(sabor.NameSabor));
        }