Exemplo n.º 1
0
        public void TestInitialize()
        {
            _storeLogicService = StoreLogicService.Instance; //todo ut: how can we re-initialize _storeLogicService if it's a singleton?

            _dataLayer = Substitute.For <IDataLayer>();
            _storeLogicService.DataLayer = _dataLayer;
        }
Exemplo n.º 2
0
        public string Register(string username)
        {
            Customer cust = new Customer(username);

            if (StoreLogicService.RegisterCustomer(cust))
            {
                return(cust.Password);
            }

            return("Error");
        }
Exemplo n.º 3
0
 public double GetBalance(string username)
 {
     return(StoreLogicService.GetBalance(username));
 }
Exemplo n.º 4
0
 public IEnumerable <CustomerProduct> GetAllOrders(string username)
 {
     return(StoreLogicService.GetAllOrders(username));
 }
Exemplo n.º 5
0
 public bool BuyProduct(string username, string productName, int quantity)
 {
     return(StoreLogicService.BuyProduct(username, productName, quantity));
 }
Exemplo n.º 6
0
 public IEnumerable <StoreProduct> GetProducts()
 {
     return(StoreLogicService.GetProducts());
 }
Exemplo n.º 7
0
 public bool CheckLogin(String username, String password)
 {
     return(StoreLogicService.VerifyLogin(username, password));
 }