public void GivenAProcessingViewModel_WhenICreateAProcessingViewModel_TheProcessingViewModelCreatedProperly() { var processingViewModel = new DashboardProcessingViewModel("1.xml", "1.zip", "docType", new ManCo("code", "description"), DateTime.Now, "grid"); processingViewModel.FileName.Should().Be("1.xml"); processingViewModel.BigZip.Should().Be("1.zip"); processingViewModel.DocType.Should().Be("docType"); processingViewModel.ManCo.Should().Be("code - description"); processingViewModel.StartDate.Should().HaveYear(DateTime.Today.Year); }
public void AddProcessing(IList <Entities.GridRun> gridRuns) { foreach (var gridRun in gridRuns) { if (gridRun.XmlFile != null) { var viewModel = new DashboardProcessingViewModel( gridRun.XmlFile.FileName, gridRun.XmlFile.BigZip, gridRun.XmlFile.DocType.Description, gridRun.XmlFile.ManCo, gridRun.StartDate.GetValueOrDefault(), gridRun.Grid); DashboardProcessingViewModels.Add(viewModel); } } }