예제 #1
0
        public void CheckInsertMethodCalled()
        {
            Mock <IOrderRepository> repositoryMock = new Mock <IOrderRepository>();
            ShopService             ss             = new ShopService(repositoryMock.Object);

            var order = ss.CreateNewOrder("created", "express", "bankTransfer");

            repositoryMock.Verify(k => k.Insert(order), Times.Once());
        }