Example #1
0
 public void SetupGetSectionString(string expected_sectionName)
 {
     GetSectionString_expected_sectionName = expected_sectionName;
     GetSectionString().Body =
         sectionName =>
     {
         GetSectionString_actual_sectionName = sectionName;
         var myElementCollection = new MyElementCollectionMock();
         {
             var myElement = new MyElementMock();
             myElement.Target = typeof(object).GetMethods().First();
             myElementCollection.Add(myElement);
         }
         return(new MySectionMock()
         {
             MyElements = myElementCollection
         });
     };
 }
Example #2
0
 public void SetupGetSectionString(string expected_sectionName, MethodBase target)
 {
     GetSectionString_expected_sectionName = expected_sectionName;
     GetSectionString().Body =
         (@this, sectionName) =>
     {
         GetSectionString_actual_sectionName = sectionName;
         var myElementCollection = new MyElementCollectionMock();
         {
             var myElement = new MyElementMock();
             myElement.Target = target;
             myElementCollection.Add(myElement);
         }
         return(new MySectionMock()
         {
             MyElements = myElementCollection
         });
     };
 }