private void AssertCorrectGdprExportReport(ItSystemUsageDTO expected, GdprExportReportCsvFormat actual, bool hasConcludedDataProcessingAgreement) { AssertDataOption(expected.IsBusinessCritical, actual.BusinessCritical); AssertDataOption(expected.RiskAssessment, actual.RiskAssessment); AssertDataOption(expected.DPIA, actual.DPIA); AssertRiskLevel(expected.PreRiskAssessment, actual.PreRiskAssessment); AssertHostedAt(expected.HostedAt, actual.HostedAt); if (hasConcludedDataProcessingAgreement) { AssertYes(actual.Datahandler); } else { AssertNo(actual.Datahandler); } }
private void AssertSensitiveDataLevel(SensitiveDataLevel expected, GdprExportReportCsvFormat actual) { switch (expected) { case SensitiveDataLevel.NONE: AssertYes(actual.NoData); AssertNo(actual.PersonalData); AssertNo(actual.SensitiveData); AssertNo(actual.LegalData); return; case SensitiveDataLevel.PERSONALDATA: AssertNo(actual.NoData); AssertYes(actual.PersonalData); AssertNo(actual.SensitiveData); AssertNo(actual.LegalData); return; case SensitiveDataLevel.SENSITIVEDATA: AssertNo(actual.NoData); AssertNo(actual.PersonalData); AssertYes(actual.SensitiveData); AssertNo(actual.LegalData); return; case SensitiveDataLevel.LEGALDATA: AssertNo(actual.NoData); AssertNo(actual.PersonalData); AssertNo(actual.SensitiveData); AssertYes(actual.LegalData); return; default: throw new AssertActualExpectedException(expected, actual, "Expected is not a correct SensitiveDataLevel"); } }