示例#1
0
        public void ChangeTab_ICommand_SetsNewBgColor()
        {
            _testProducts.AddProductTab(true, "Yellow", 2, "YellowStuff", 1);
            _fakeSalesController.ProductTabs.Returns(_testProducts.TestData);

            _uut.FetchView();

            var Command = _uut.ChangeTab;

            Command.Execute(2);

            Assert.That(_uut.BackGroundColour, Is.EqualTo("Yellow"));
        }
示例#2
0
        public void SetUp()
        {
            _testProducts        = new MakeProducts();
            _fakeSalesController = Substitute.For <ISalesController>();
            _fakeNumpad          = Substitute.For <INumpad>();
            _uut            = new TabViewModel(_fakeSalesController, _fakeNumpad);
            _fakeNotifyTest = Substitute.For <INotifyTest>();


            _testProducts.AddProductTab(true, "Red", 1, "RedStuff", 1);
            _testProducts.AddProductType("Red", 1, 20, "RedSnask", 1);
            _testProducts.AddProductGroup("RedHat", 2, 1, 1);
            _testProducts.AddProduct("GreenAle", 20, true, 1, 1, 2);
        }
示例#3
0
        public void SetUp()
        {
            _testProducts = new MakeProducts();
            _fakeSalesController = Substitute.For<ISalesController>();
            _fakeNumpad = Substitute.For<INumpad>();
            _uut = new TabViewModel(_fakeSalesController, _fakeNumpad);
            _fakeNotifyTest = Substitute.For<INotifyTest>();

            _testProducts.AddProductTab(true, "Red", 1, "RedStuff", 1);
            _testProducts.AddProductType("Red", 1, 20, "RedSnask", 1);
            _testProducts.AddProductGroup("RedHat", 2, 1, 1);
            _testProducts.AddProduct("GreenAle", 20, true, 1, 1, 2);
        }