Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            // Load users from data file
            List<User> users = JsonConvert.DeserializeObject<List<User>>(File.ReadAllText(@"Data/Users.json"));

            // Load products from data file
            List<Product> products = JsonConvert.DeserializeObject<List<Product>>(File.ReadAllText(@"Data/Products.json"));

            DataManager dataManager = new DataManager(users, products);
            WriteWelcomeToTUSCMessage();

            User loggedInUser = LoginManager.LogIn(users);
            if (loggedInUser != null)
            {
                Store store = new Store(loggedInUser, dataManager);

                Tusc tusc = new Tusc(loggedInUser, store);
                tusc.Run();
            }
        }
Ejemplo n.º 2
0
 public void testCannotBeCreatedWithoutUi()
 {
     Store store = new Store(sampleProducts, null);
 }
Ejemplo n.º 3
0
 public Tusc(User user, Store store)
 {
     this.user = user;
     this.store = store;
 }
Ejemplo n.º 4
0
 public void testCannotBeCreatedWithoutProductList()
 {
     Store store = new Store(null, ui);
 }