Exemple #1
0
        public void GetPoseWrapper_Generates_Wrapper_From_Expression()
        {
            var wrapper = Shimmer.GetPoseWrapper(() => StaticTestClass.VoidMethod());

            Assert.IsNotNull(wrapper);
            wrapper.Execute();
            Assert.IsNotNull(wrapper.LastExecutionResults);
            Assert.AreEqual(1, wrapper.LastExecutionResults.Count);
        }
Exemple #2
0
 public void GetPoseWrapper_T_From_Expression_Throws_InvalidOperationException_On_Non_Matching_Return_Type()
 {
     try
     {
         var wrapper = Shimmer.GetPoseWrapper <string>(() => StaticTestClass.VoidMethod());
         Assert.Fail("Expected ArgumentException.");
     }
     catch (ArgumentException e)
     {
         Assert.AreEqual(Shimmer.NonMatchingReturnType, e.Message);
     }
 }