示例#1
0
        public async Task NotMocked_3()
        {
            IWithAsyncStuff wClass = new WithAsyncStuff();
            int             result = await wClass.MethodThree(string.Empty, 1, DateTime.Now);

            Assert.AreEqual(2, result);
        }
示例#2
0
        public async Task NotMocked_1()
        {
            WithAsyncStuff wClass = new WithAsyncStuff();
            int            result = await wClass.MethodOne(1);

            Assert.AreEqual(2, result);
        }
示例#3
0
        public void NotMockedWrapped_3()
        {
            WithAsyncStuff aClass   = new WithAsyncStuff();
            ClassUnderTest woaClass = new ClassUnderTest(aClass);
            int            result   = woaClass.MethodThree(string.Empty, 1, DateTime.Now);

            Assert.AreEqual(2, result);
        }
示例#4
0
        public void NotMocked_3_ThrowEx_2()
        {
            IWithAsyncStuff wClass = new WithAsyncStuff();

            try
            {
                int result = wClass.MethodThree(string.Empty, 1, null).Result;
            }
            catch (Exception ex)
            {
                Assert.AreEqual(ex.GetBaseException().GetType(), typeof(ArgumentNullException));
            }
        }
示例#5
0
 public void NotMockedWrapped_3_ThrowEx()
 {
     WithAsyncStuff aClass   = new WithAsyncStuff();
     ClassUnderTest woaClass = new ClassUnderTest(aClass);
     int            result   = woaClass.MethodThree(string.Empty, 1, null);
 }
示例#6
0
 public void NotMocked_3_ThrowEx_1()
 {
     IWithAsyncStuff wClass = new WithAsyncStuff();
     int             result = wClass.MethodThree(string.Empty, 1, null).Result;
 }