Exemplo n.º 1
0
 public string ToListJson()
 {
     return(String.Format("{{Name:\"{0}\", UniqueName:\"{1}\", Description:\"{2}\", Category:{3}, Timeout:{4}, Results:[{5}]}}",
                          Name.EscapeJson(), UniqueName.EscapeJson(), Description.EscapeJson(), Category.ToListJson(),
                          Timeout.MaybeStruct(m => m.ToString(), () => "null"),
                          string.Join(",", Results.Select(it => it.ToListJson()).ToArray())));
 }
Exemplo n.º 2
0
 public string ToListJson()
 {
     return(String.Format("{{Name:\"{0}\", UniqueName:\"{1}\", Fixtures:[{2}]}}",
                          Name.EscapeJson(), UniqueName.EscapeJson(),
                          String.Join(",", Fixtures.Select(it => it.ToListJson()).ToArray())
                          ));
 }
Exemplo n.º 3
0
 public string ToItemJson()
 {
     return(String.Format("{{Fixture:{4}, Timeout:{5}, Description:\"{2}\", Category:{3}, UniqueName:\"{1}\", Name:\"{0}\", }}",
                          Name.EscapeJson(), UniqueName.EscapeJson(), Description.EscapeJson(), Category.ToListJson(), Fixture.ToItemJson(), Timeout));
 }
Exemplo n.º 4
0
 public string ToItemJson()
 {
     return(String.Format("{{Assembly:{4}, Category:{3}, Description:\"{2}\", UniqueName:\"{1}\", Name:\"{0}\",}}",
                          Name.EscapeJson(), UniqueName.EscapeJson(), Description.EscapeJson(), Category.ToListJson(), Assembly.ToItemJson()
                          ));
 }
Exemplo n.º 5
0
 public string ToListJson()
 {
     return(String.Format("{{Name:\"{0}\", UniqueName:\"{1}\", Description:\"{2}\", Category:{3}, Tests:[{4}]}}",
                          Name.EscapeJson(), UniqueName.EscapeJson(), Description.EscapeJson(), Category.ToListJson(), String.Join(",", Tests.Select(it => it.ToListJson()).ToArray())
                          ));
 }
Exemplo n.º 6
0
 public string ToItemJson()
 {
     return(String.Format("{{UniqueName:\"{1}\",  Name:\"{0}\"}}",
                          Name.EscapeJson(), UniqueName.EscapeJson()));
 }