Beispiel #1
0
 public void JobOutput()
 {
     var j = new AtlasJob()
     {
         Commands = new Command[] { new Command() { CommandLine = "ls" } },
         Name = "MyJob",
         Version = 1234,
         Release = new Release() { Name = "notmyrelease" },
         SubmitCommand = new Submit() { SubmitCommand = new Command() { CommandLine = "submit" } },
         Packages = new Package[] { new Package() { Name = "hithere", SCTag = "tag" } }
     };
     Assert.AreEqual("job(MyJob,1234){release(notmyrelease)package(hithere,tag)submit(submit)}", j.Print());
 }
Beispiel #2
0
 public void PrintEmptyJob()
 {
     var j = new AtlasJob() { Name = "hihere", Version = 10 };
     var s = j.Print();
     Assert.AreEqual("job(hihere,10){}", s);
 }
Beispiel #3
0
 /// <summary>
 /// Return the hash code for this job definition.
 /// </summary>
 /// <param name="J"></param>
 /// <returns></returns>
 public static string Hash(this AtlasJob J)
 {
     return(J.Print().ComputeMD5Hash());
 }
Beispiel #4
0
 public static string Print(this AtlasJob r, bool prettyPrint = false)
 {
     return(r.Print(new StringBuilder(), prettyPrint: prettyPrint).ToString());
 }