コード例 #1
0
        public void GetNotExistingProduct()
        {
            var repository = new CatalogRepository();

            //Assert
            var product = repository.GetByName("testtest");

            Assert.IsNotNull(product);
        }
コード例 #2
0
        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);
        }