////done public void CommandParser_Command_ShouldNotTriggerException(string command, string desc) { //arrange User user1 = new User(id: 1, firstname: "jakob1", lastname: "skov", username: "******", email: "*****@*****.**", balance: 100, lowBalanceDefinition: 50); User user2 = new User(id: 2, firstname: "jakob1", lastname: "skov", username: "******", email: "*****@*****.**", balance: 100, lowBalanceDefinition: 50); User user3 = new User(id: 3, firstname: "jakob1", lastname: "skov", username: "******", email: "*****@*****.**", balance: 100, lowBalanceDefinition: 50); Product A = new Product(id: 1, name: "A", price: 1); Product B = new Product(id: 10, name: "B", price: 10); Product C = new Product(id: 33, name: "C", price: 100); List <Product> products = new List <Product>() { A, B, C }; List <User> users = new List <User>() { user1, user2, user3 }; Stregsystem stregsystem = new Stregsystem(users: users, products: products); IStregsystemUI ui = new StregsystemCLI(stregsystem); StregsystemController sc = new StregsystemController(ui, stregsystem); //act //assert Assert.DoesNotThrow(() => ui.Start(command), $"{desc}: exception"); }
static void Main(string[] args) { IStregsystem stregsystem = new Stregsystem(); IStregsystemUI ui = new StregsystemCLI(stregsystem); StregsystemCommandParser sc = new StregsystemCommandParser(ui, stregsystem); ui.Start(); }
static void Main(string[] args) { PointSystem pointsystem = new PointSystem(); StregsystemCLI ui = new StregsystemCLI(pointsystem); StregsystemCommandParser control = new StregsystemCommandParser(pointsystem, ui); ui.Start(); }
static void Main(string[] args) { // Would have liked to use my UserList class here User Jacob = new User("Jacob", "Thomsen", "stgeorge", "*****@*****.**", 49); User John = new User("John", "Cena", "johncenashow", "*****@*****.**", 150); Stregsystem stregsystem = new Stregsystem(); stregsystem.userList.Add(John); stregsystem.userList.Add(Jacob); StregsystemCLI ui = new StregsystemCLI(stregsystem); StregsystemController sc = new StregsystemController(ui, stregsystem); ui.Start(sc); System.Console.ReadKey(); }