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")); }
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); }
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); }