Esempio n. 1
0
        public void Init()
        {
            // Arrange
            var mockRepo     = new Mock <IStoreRepository> ();
            var mockCartRepo = new Mock <ICartRepository> ();

            category = new Category("Cat1");
            mockRepo.Setup(s => s.AddCategory(category));
            mockRepo.SetupGet(r => r.Categories).Returns(new List <Category> {
                category
            });
            store = new Store(mockRepo.Object, mockCartRepo.Object);

            // Act
            store.AddCategory(category);
        }