예제 #1
0
        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);
            }
        }
예제 #2
0
 /// <summary>
 /// Default Constructor
 /// </summary>
 public OrderSvcMongoImpl()
 {
     XmlConfigurator.Configure(new FileInfo("config/log4net.properties"));
     factory = Factory.getInstance();
     burritoSvc = (IBurritoSvc) factory.getService("IBurritoSvc");
 }
예제 #3
0
 /// <summary>
 /// Default Constructor
 /// </summary>
 public OrderSvcMongoImpl()
 {
     XmlConfigurator.Configure(new FileInfo("config/log4net.properties"));
     factory    = Factory.getInstance();
     burritoSvc = (IBurritoSvc)factory.getService("IBurritoSvc");
 }
예제 #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="burritoSvc"></param>
 public void setBurritoSvc(IBurritoSvc burritoSvc)
 {
     this.burritoSvc = burritoSvc;
 }
예제 #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="burritoSvc"></param>
 public void setBurritoSvc(IBurritoSvc burritoSvc)
 {
     this.burritoSvc = burritoSvc;
 }