コード例 #1
0
        public void Clear()
        {
            ProductTypeRepository repo = CreateRepository();

            repo.Clear();
            Assert.AreEqual(0, repo.CountProducts());
        }
コード例 #2
0
        public void SaveAndCount()
        {
            ProductTypeRepository repo = CreateRepository();

            repo.Clear();
            ProductType dryer = repo.CreateProduct(1, 263.00, "Very stronk pink hair dryer!!", 50);

            Assert.AreEqual(1, repo.CountProducts());
        }
コード例 #3
0
        public void SaveAndCountTwoProducts()
        {
            ProductTypeRepository repo = CreateRepository();

            repo.Clear();
            ProductType dryer     = repo.CreateProduct(1, 263.00, "Very stronk pink hair dryer!!", 50);
            ProductType hairbrush = repo.CreateProduct(2, 39.00, "Very soft purple hair brush", 20);

            Assert.AreEqual(2, repo.CountProducts());
        }