Ejemplo n.º 1
0
 public static void TestReplaceOfferingNoMatch(ConfigurationStore store)
 {
     DesktopOfferingElement offering = new DesktopOfferingElement() {
         Name = "should not match",
         Description = "this has been modified"
     };
     Console.WriteLine("Modify Desktop Offering {0}", offering.Name);
     try {
         store.ReplaceDesktopOffering(offering);
         Console.WriteLine("FAIL: replaced with a new name");
     } catch (ArgumentException e) {
         Console.WriteLine("PASS: Exception thrown: {0}", e.Message);
     }
 }
Ejemplo n.º 2
0
 public static void TestReplaceOffering(ConfigurationStore store)
 {
     DesktopOfferingElement offering =  store.Configuration.DesktopOfferings.First() as DesktopOfferingElement;
     offering.Description += " (modified)";
     Console.WriteLine("Modify Desktop Offering {0}", offering.Name);
     store.ReplaceDesktopOffering(offering);
     IDesktopOffering result = store.Configuration.DesktopOfferings.FirstOrDefault(o => o.Description == offering.Description);
     Console.WriteLine((result != null) ? "PASS: offering was modified" : "FAIL: offering  not modified");
 }