public void TimetableFileModelExtensionsClass_ToTimetableDocumentMethod_ThrowsArgumentNullException_IfParameterIsNull() { TimetableFileModel testObject = null; _ = testObject.ToTimetableDocument(); Assert.Fail(); }
public void TimetableFileModelExtensionsClassToTimetableDocumentMethodReturnsTimetableDocumentObjectWithExportOptionsPropertyThatIsNotNullIfExportOptionsPropertyOfParameterIsNotNull() { TimetableFileModel testSourceObject = new TimetableFileModel { ExportOptions = new ExportOptionsModel() }; TimetableDocument testResultObject = testSourceObject.ToTimetableDocument(); Assert.IsNotNull(testResultObject.ExportOptions); }
public void TimetableFIleModelExtensionsClass_ToTimetableDocumentMethod_ThrowsArgumentNullExceptionWithCorrectParamNameProperty_IfParameterIsNull() { TimetableFileModel testObject = null; try { _ = testObject.ToTimetableDocument(); Assert.Fail(); } catch (ArgumentNullException ex) { Assert.AreEqual("file", ex.ParamName); } }
public void TimetableFileModelExtensionsClassToTimetableDocumentMethodReturnsTimetableDocumentObjectWithExportOptionsPropertyWithCorrectDisplayLocoDiagramRowPropertyIfExportOptionsPropertyOfParameterIsNotNull() { Random random = new Random(); for (int i = 0; i < TestMultipleRuns; ++i) { bool testValue = random.NextBoolean(); TimetableFileModel testSourceObject = new TimetableFileModel { ExportOptions = new ExportOptionsModel { DisplayLocoDiagramRow = testValue } }; TimetableDocument testResultObject = testSourceObject.ToTimetableDocument(); Assert.AreEqual(testValue, testResultObject.ExportOptions.DisplayLocoDiagramRow); } }