예제 #1
0
 public void GetSubEntryHandleArgumentExceptionForNegativeTest()
 {
     RasConnection target = new RasConnection();
     target.GetSubEntryHandle(-1);
 }
예제 #2
0
        public void GetSubEntryHandleTest()
        {
            RasHandle expected = new RasHandle(new IntPtr(1), true);

            Mock<IRasHelper> mock = new Mock<IRasHelper>();
            RasHelper.Instance = mock.Object;

            mock.Setup(o => o.GetSubEntryHandle(It.IsAny<RasHandle>(), It.IsAny<int>())).Returns(expected);

            RasConnection target = new RasConnection();
            RasHandle actual = target.GetSubEntryHandle(1);

            Assert.AreSame(expected, actual);
        }
예제 #3
0
 public void GetSubEntryHandleArgumentExceptionForZeroTest()
 {
     RasConnection target = new RasConnection();
     target.GetSubEntryHandle(0);
 }