public void UpdateInvalidOperationExceptionTest() { string name = "Test Entry"; RasEntry target = new RasEntry(name); target.Update(); }
public void UpdateTest() { RasPhoneBook pbk = new RasPhoneBook(); RasEntry target = new RasEntry("Test Entry"); target.Owner = pbk; Mock<IRasHelper> mock = new Mock<IRasHelper>(); RasHelper.Instance = mock.Object; mock.Setup(o => o.SetEntryProperties(pbk, target)).Returns(true); bool result = target.Update(); Assert.IsTrue(result); }