public void ShouldFillComboInfoWhenLoading()
        {
            //Arrange
            Mock<IPermittingView> view = new  Mock<IPermittingView>();

            EquipmentComboVO equipment = new EquipmentComboVO()
            {
                EquipmentId = 1,
                IsPrimary = true,
                DivisionNumber = "084",
                UnitNumber = "01",
                Descriptor = "Dozer"
            };

            view.SetupProperty(v => v.EquipmentInfoItem, equipment);
            view.SetupProperty(v => v.IsPrimaryObjectSelected, false);
            view.SetupProperty(v => v.DivisionSelected, string.Empty);
            view.SetupProperty(v => v.UnitNumberSelected, string.Empty);
            view.SetupProperty(v => v.DescriptorSelected, string.Empty);
            //Act
            PermittingPresenter presenter = new PermittingPresenter(view.Object);
            presenter.LoadShoppingCartRow();

            //Assert
            Assert.IsTrue(view.Object.IsPrimaryObjectSelected);
            Assert.AreEqual<string>(view.Object.DivisionSelected, "084");
            Assert.AreEqual<string>(view.Object.UnitNumberSelected, "01");
            Assert.AreEqual<string>(view.Object.DescriptorSelected, "Dozer");
        }
        public void RemoveEquipmentFromShoppingCart()
        {
            List<EquipmentComboVO> equipmentList = new List<EquipmentComboVO>();

            EquipmentComboVO dataItem = new EquipmentComboVO()
            {
                Descriptor = null,
                DivisionNumber = "One",
                EquipmentId = 1,
                IsPrimary = true,
                UnitNumber = "NumberOne"
            };

            equipmentList.Add(dataItem);

            EquipmentComboVO dataItem2 = new EquipmentComboVO()
                {
                    Descriptor = null,
                    DivisionNumber = "One",
                    EquipmentId = 2,
                    IsPrimary = false,
                    UnitNumber = "NumberTwo"
                };

            equipmentList.Add(dataItem2);

            List<int> selectedEquipments = new List<int>();

            selectedEquipments.Add(2);

            Mock<IPermittingView> mock = new Mock<IPermittingView>();
            mock.SetupProperty(c => c.EquipmentInfoShoppingCartDataSource, equipmentList);
            mock.SetupProperty(c => c.RemovedEquipments, selectedEquipments);

            PermittingViewModel viewModel = new PermittingViewModel(mock.Object);
            viewModel.RemoveEquipmentFromShoppingCart();

            Assert.AreEqual(1, mock.Object.EquipmentInfoShoppingCartDataSource.Count);
        }
        /// <summary>
        /// Returns a equipment
        /// </summary>
        /// <param name="equipmentId">Equipment Identifier</param>
        /// <returns>Equipment List</returns>
        public virtual EquipmentComboVO GetEquipmentOfACombo(int equipmentId)
        {
            EquipmentComboVO returnEntity = null;

            CS_Equipment equipment = _equipmentRepository.Get(e => e.ID == equipmentId);
            if (null != equipment)
            {
                returnEntity = new EquipmentComboVO()
                {
                    EquipmentId = equipment.ID,
                    DivisionNumber = equipment.DivisionName,
                    UnitNumber = equipment.Name,
                    Descriptor = equipment.Description,
                    IsPrimary = false,
                    Seasonal = equipment.Seasonal
                };
            }

            return returnEntity;
        }