void CanSetEveryValue() { var args = new JobCollectionArgs() { Count = 100, Offset = 100, Search = "some_unchecked_string", SortDirection = SortDirection.Ascending, SortKey = "some_unchecked_string" }; Assert.Equal("count=100; offset=100; search=some_unchecked_string; sort_dir=asc; sort_key=some_unchecked_string", args.ToString()); Assert.Equal(new List <Argument>() { new Argument("count", "100"), new Argument("offset", "100"), new Argument("search", "some_unchecked_string"), new Argument("sort_dir", "asc"), new Argument("sort_key", "some_unchecked_string"), }, args); }
void CanConstruct() { string[] expectedString = new string[] { "count=30; offset=0; search=null; sort_dir=desc; sort_key=dispatch_time", "count=30; offset=0; search=some_unchecked_string; sort_dir=desc; sort_key=dispatch_time" }; var expectedArguments = new List <Argument>[] { new List <Argument>() { }, new List <Argument>() { new Argument("search", "some_unchecked_string") } }; JobCollectionArgs args; args = new JobCollectionArgs(); Assert.Equal(expectedString[0], args.ToString()); Assert.Equal(expectedArguments[0], args); }