public static ReportRequestPropertiesContainer GenerateReportRequest(string reportType, ContentUpdateFrequency reportUpdateFrequency, IEnumerable <string> requestedMarketplaces = null, DateTime?startDate = null, DateTime?endDate = null, ReportOptions reportOptions = null) { ValidateMarketplaceCompatibility(reportType, requestedMarketplaces); return(new ReportRequestPropertiesContainer(reportType, reportUpdateFrequency, requestedMarketplaces, startDate, endDate, reportOptions?.GetOptionsString())); }
public void GetOptionsString_ReturnsExpectedOptionsAsString() { _reportOptions.AddStringOption("testOptionName1", "testOptionValue"); _reportOptions.AddBooleanOption("testOptionName2", true); _reportOptions.AddIntegerOption("testOptionName3", 11); var expectedOptionsAsString = "testOptionName1=testOptionValue;testOptionName2=true;testOptionName3=11;"; var actualOptionsAsString = _reportOptions.GetOptionsString(); Assert.AreEqual(expectedOptionsAsString, actualOptionsAsString); }