コード例 #1
0
        public void AcceptTest()
        {
            Monitor monitor = new Monitor();
            Mock <IComputerPartVisitor> mockComputerPartVisitor = new Mock <IComputerPartVisitor>();

            monitor.Accept(mockComputerPartVisitor.Object);

            mockComputerPartVisitor.Verify(visitor => visitor.Visit(monitor), Times.Once());
        }