public void Should_Throw_On_Invalid_ServiceEndpoint_Url_Parameter() { //Given SsrsConnectionSettings settings = new SsrsConnectionSettings(); string serviceEndpoint = "ftp://localhost/reportserver/ReportService2010.asmx"; //When var record = Record.Exception(() => SsrsConnectionSettingsExtensions.SetServiceEndpoint(settings, serviceEndpoint)); //Then CakeAssert.IsExceptionWithMessage <UriFormatException>(record, $"{ nameof(serviceEndpoint) } is not a valid http or https scheme url."); }
public void Should_Set_ServiceEndpoint_Url() { //Given SsrsConnectionSettings settings = new SsrsConnectionSettings(); string serviceEndpoint = "http://localhost/reportserver/ReportService2010.asmx"; //When SsrsConnectionSettingsExtensions.SetServiceEndpoint(settings, serviceEndpoint); //Then Assert.Equal(serviceEndpoint, settings.ServiceEndpoint); }
public void Should_Throw_On_Null_ServiceEndpoint_Parameter() { //Given SsrsConnectionSettings settings = new SsrsConnectionSettings(); string serviceEndpoint = ""; //When var record = Record.Exception(() => SsrsConnectionSettingsExtensions.SetServiceEndpoint(settings, serviceEndpoint)); //Then CakeAssert.IsArgumentNullException(record, nameof(serviceEndpoint)); }