static void DemoMaintenance() { ApplicationServices app = new ApplicationServices(); string userName = "******"; app.RegisterUser(userName); app.Deposit(150); Purchase(app, "book"); using (File.Create("maintenance.lock")) { } Purchase(app, "book"); File.Delete("maintenance.lock"); Purchase(app, "book"); }
static void DemoPurchase() { ApplicationServices app = new ApplicationServices(); string userName = "******"; app.RegisterUser(userName); app.Deposit(150); Purchase(app, "book"); Purchase(app, "book"); Purchase(app, "parachute"); Purchase(app, "book"); Purchase(app, "book"); AnonymousPurchase(app, "book"); AnonymousPurchase(app, "parachute"); }
static void DemoReferral() { ApplicationServices app = new ApplicationServices(); string userName = "******"; app.RegisterUser(userName); app.Deposit(200); Purchase(app, "book"); app.RegisterUser("Joe", userName); app.Login(userName); Purchase(app, "book"); app.RegisterUser("Jill", userName); app.Login(userName); Purchase(app, "book"); }