示例#1
0
 public void Exec_List_ConvertsStringToObject()
 {
     new AppRunner <App>().Verify(new Scenario
     {
         When = { Args = "Do file1 dir1" },
         Then =
         {
             AssertContext = ctx => ctx.ParamValuesShouldBe(
                 new StringCtorObject("file1"), StaticParseObject.Parse("dir1"))
         }
     });
 }
示例#2
0
 public void Exec_ConvertsStringToObject()
 {
     new AppRunner <App>().Verify(new Scenario
     {
         When = { Args = "DoList -c file1 -c file2 -p dir1 -p dir2" },
         Then =
         {
             AssertContext = ctx => ctx.ParamValuesShouldBe(
                 new List <StringCtorObject>
             {
                 new StringCtorObject("file1"),
                 new StringCtorObject("file2")
             },
                 new List <StaticParseObject>
             {
                 StaticParseObject.Parse("dir1"),
                 StaticParseObject.Parse("dir2")
             })
         }
     });
 }