public void VerifyPropertyWithVerifyGet() { var mock = new Mock <IPropertyManager>(); var nameUser = new PropertyManagerConsumer(mock.Object); nameUser.GetName(); mock.VerifyGet(m => m.FirstName, Times.Once); }
public void StupPropertyWithSetupGet() { var mock = new Mock <IPropertyManager>(); var nameUser = new PropertyManagerConsumer(mock.Object); mock.SetupGet(m => m.FirstName).Returns("Shrubbery!"); var name = nameUser.GetName(); name.Should().Be("Shrubbery!"); }