public void testBurritoSvc() { try { //week 3 //IBurritoSvc ics = factory.getBurritoSvc(); //week 4 dLog.Debug("Going to get the service implementation"); IBurritoSvc ics = (IBurritoSvc)factory.getService("IBurritoSvc"); dLog.Debug("Going to create burrito"); // First let's store the Burrito Assert.True(ics.storeBurrito(b)); dLog.Debug("Going to read burrito"); // Then let's read it back in b = ics.getBurrito(b.id); Assert.True(b.validate()); // Update burrito dLog.Debug("Going to update burrito"); b.Beef = false; b.Hummus = true; Assert.True(ics.storeBurrito(b)); dLog.Debug("Going to delete burrito"); // Finally, let's cleanup the file that was created Assert.True(ics.deleteBurrito(b.id)); } catch (Exception e) { Console.WriteLine("Exception in testBurritoSvc: " + e.Message + "\n" + e.StackTrace); Assert.Fail(e.Message + "\n" + e.StackTrace); } }
/// <summary> /// Default Constructor /// </summary> public OrderSvcMongoImpl() { XmlConfigurator.Configure(new FileInfo("config/log4net.properties")); factory = Factory.getInstance(); burritoSvc = (IBurritoSvc) factory.getService("IBurritoSvc"); }
/// <summary> /// Default Constructor /// </summary> public OrderSvcMongoImpl() { XmlConfigurator.Configure(new FileInfo("config/log4net.properties")); factory = Factory.getInstance(); burritoSvc = (IBurritoSvc)factory.getService("IBurritoSvc"); }
/// <summary> /// /// </summary> /// <param name="burritoSvc"></param> public void setBurritoSvc(IBurritoSvc burritoSvc) { this.burritoSvc = burritoSvc; }