public void TimetableDocumentExtensionsClass_ToTimetableFileModelMethod_ReturnsModelWithExportOptionsPropertyThatIsNotNull() { TimetableDocument document = new TimetableDocument(); TimetableFileModel result = document.ToTimetableFileModel(); Assert.IsNotNull(result.ExportOptions); }
public void TimetableDocumentExtensionsClass_ToTimetableFileModelMethod_ThrowsArgumentNullException_IfParameterIsNull() { TimetableDocument document = null; _ = document.ToTimetableFileModel(); Assert.Fail(); }
public void TimetableFileDocumentExtensionsClass_ToTimetableFileModelMethod_ThrowsArgumentNullExceptionWithCorrectParamNameProperty_IfParameterIsNull() { TimetableDocument document = null; try { _ = document.ToTimetableFileModel(); Assert.Fail(); } catch (ArgumentNullException ex) { Assert.AreEqual("document", ex.ParamName); } }
public void TimetableDocumentExtensionsClass_ToTimetableFileModelMethod_ReturnsModelWithExportOptionsPropertyWithCorrectDisplayLocoDiagramRowValue() { Random random = new Random(); for (int i = 0; i < TestMultipleRuns; ++i) { bool testValue = random.NextBoolean(); TimetableDocument document = new TimetableDocument { ExportOptions = new DocumentExportOptions { DisplayLocoDiagramRow = testValue } }; TimetableFileModel result = document.ToTimetableFileModel(); Assert.AreEqual(testValue, result.ExportOptions.DisplayLocoDiagramRow); } }