public async Task Initialize() { ProxyMarketContext.Instance.marketTearDown(); marketStores = MarketStores.Instance; marketUsers = MarketUsers.Instance; PublisherManagement.Instance.DeleteAll(); marketUsers.DeleteAll(); marketStores.DeleteAll(); PublisherManagement.Instance.SetTestMode(true); this.user = new User("UserTests"); user.ChangeState(new MemberState(user.Username)); var dataUser = new DataUser(user.Username, "", new Address("1", "1", "1", "1", "1"), "054444444"); dataUser.IsLoggedin = true; await ProxyMarketContext.Instance.AddDataUser(dataUser); marketUsers.ActiveUsers.TryAdd(user.Username, user); this.store = new Store("Founder", new CreditCard("1", "1", "1", "1", "1", "1"), new Address("1", "1", "1", "1", "1")); founderUser = new User("Founder"); founderUser.ChangeState(new MemberState(founderUser.Username)); this.founder = Founder.makeFounder((MemberState)founderUser.State, store); store.Founder = founder; dataUser = new DataUser(founderUser.Username, "", new Address("1", "1", "1", "1", "1"), "054444444"); dataUser.IsLoggedin = true; await ProxyMarketContext.Instance.AddDataUser(dataUser); marketUsers.ActiveUsers.TryAdd(founder.Username, founderUser); ProxyMarketContext.Instance.IsDebug = true; }