예제 #1
0
        public void UpdateInvalidOperationExceptionTest()
        {
            string name = "Test Entry";

            RasEntry target = new RasEntry(name);
            target.Update();
        }
예제 #2
0
        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);
        }