Ejemplo n.º 1
0
 public void Setup()
 {
     //market
     using var context = new MarketDbContext(Effort.DbConnectionFactory.CreateTransient());
     context.Init();
     marketFacade          = new MarketFacade(ADMIN_USERNAME, PASSWORD, new NotificationManager(), true);
     GUEST_SESSION_ID      = Guid.NewGuid();
     REGISTERED_SESSION_ID = Guid.NewGuid();
     ADMIN_SESSION_ID      = Guid.NewGuid();
 }
Ejemplo n.º 2
0
        private static string InitiateMarketFacade(string adminUsername, string adminPassword, ICommunicationNotificationAlerter communication,
                                                   out IMarketFacade newMarketFacade, bool useInMemoryDB)
        {
            if (string.IsNullOrEmpty(adminPassword) || string.IsNullOrWhiteSpace(adminUsername))
            {
                newMarketFacade = null;
                Logger.writeEvent("InitiateMarketFacade : Invalid input");
                return(Json.Create_json_response(false, "Invalid input"));
            }

            newMarketFacade = new MarketFacade(adminUsername, adminPassword, communication, useInMemoryDB);

            Logger.writeEvent("InitiateMarketFacade: Initialized Successfully");
            return(Json.Create_json_response(true, true));
        }