Beispiel #1
0
 private void setupAddRemoveMethods(TECBid bid)
 {
     addControllerMethod    = bid.AddController;
     addPanelMethod         = bid.Panels.Add;
     deleteControllerMethod = controller => {
         bid.RemoveController(controller);
     };
     deletePanelMethod = panel => { bid.Panels.Remove(panel); };
 }
Beispiel #2
0
        public void RemoveControllerTest()
        {
            TECBid           bid        = new TECBid();
            TECFBOController controller = new TECFBOController(bid.Catalogs);

            bid.AddController(controller);

            bid.RemoveController(controller);

            Assert.IsFalse(bid.Controllers.Contains(controller));
            Assert.AreEqual(0, bid.Controllers.Count);
        }
Beispiel #3
0
        public void RemoveController()
        {
            //Arrange
            TECController controller = ModelCreation.TestProvidedController(bid.Catalogs, rand);

            controller.AssignRandomScopeProperties(bid.Catalogs, rand);
            bid.AddController(controller);

            MaterialSummaryVM matVM = new MaterialSummaryVM(bid, cw);

            CostBatch initial = MatVMToCostBatch(matVM);

            //Act
            bid.RemoveController(controller);

            //Assert
            AssertMaterialVMMatchesCostBatch(matVM, initial - controller.CostBatch);
        }