Example #1
0
        public void WhenCallToSaveMethodThenTheNumberOfCalledToSaveWordMethodIsOne()
        {
            var soundexMock   = Substitute.For <ISaveData>();
            var dataContainer = new DataContaioner(soundexMock);

            dataContainer.Save("abcd");

            soundexMock.Received(1).SaveWord(Arg.Any <string>());
        }
        public void WhenCallToSaveMethodThenTheNumberOfCalledToSaveWordMethodIsOne()
        {
            var soundexMock   = new Mock <ISaveData>();
            var dataContainer = new DataContaioner(soundexMock.Object);

            dataContainer.Save("abcd");

            soundexMock.Verify(m => m.SaveWord(It.IsAny <string>()), Times.Once);
        }