예제 #1
0
        public void SaveNewsBlocks()
        {
            var testBuilder = new TestBuilder();
            var repo        = testBuilder.SetupMockData(new List <NewsBlock>()).Build();

            var newsBlock = testBuilder.CreateNewsBlock();

            repo.Save(newsBlock);

            testBuilder.MockSet.Verify(_ => _.Add(newsBlock), Times.Once());
            testBuilder.MockContext.Verify(_ => _.SaveChanges(), Times.Once);
        }