public void GetNotExistingProduct() { var repository = new CatalogRepository(); //Assert var product = repository.GetByName("testtest"); Assert.IsNotNull(product); }
public void AddAndGetProduct() { var testObject = new Product() { Name = "nametestproduct", Description = "this is a test", Quantity = 2 }; var repository = new CatalogRepository(); repository.Create(testObject); //Assert var product = repository.GetByName(testObject.Name); Assert.IsNotNull(product); }