-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Cédric L. Charlier
committed
Jul 11, 2016
1 parent
0e87dcd
commit 2b61c30
Showing
4 changed files
with
94 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
using NUnit.Framework; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SsrsDeploy.Testing | ||
{ | ||
[TestFixture] | ||
public class ProgramTest | ||
{ | ||
[Test] | ||
public void GetUrl_FullName() | ||
{ | ||
var options = new Options() { Url = "http://reporting.company.com/ReportServer/ReportService2010.asmx" }; | ||
var url = Program.GetUrl(options); | ||
|
||
Assert.That(url, Is.EqualTo("http://reporting.company.com/ReportServer/ReportService2010.asmx")); | ||
} | ||
|
||
[Test] | ||
public void GetUrl_Host() | ||
{ | ||
var options = new Options() { Url = "reporting.company.com" }; | ||
var url = Program.GetUrl(options); | ||
|
||
Assert.That(url, Is.EqualTo("http://reporting.company.com/ReportServer/ReportService2010.asmx")); | ||
} | ||
|
||
[Test] | ||
public void GetUrl_HostPath() | ||
{ | ||
var options = new Options() { Url = "reporting.company.com/ReportServer" }; | ||
var url = Program.GetUrl(options); | ||
|
||
Assert.That(url, Is.EqualTo("http://reporting.company.com/ReportServer/ReportService2010.asmx")); | ||
} | ||
|
||
[Test] | ||
public void GetUrl_HostPathSlash() | ||
{ | ||
var options = new Options() { Url = "reporting.company.com/ReportServer/" }; | ||
var url = Program.GetUrl(options); | ||
|
||
Assert.That(url, Is.EqualTo("http://reporting.company.com/ReportServer/ReportService2010.asmx")); | ||
} | ||
|
||
[Test] | ||
public void GetUrl_HostPathFile() | ||
{ | ||
var options = new Options() { Url = "reporting.company.com/ReportServer/ReportService2010.asmx" }; | ||
var url = Program.GetUrl(options); | ||
|
||
Assert.That(url, Is.EqualTo("http://reporting.company.com/ReportServer/ReportService2010.asmx")); | ||
} | ||
|
||
[Test] | ||
public void GetUrl_SchemeHostPort() | ||
{ | ||
var options = new Options() { Url = "http://reporting.company.com:8080" }; | ||
var url = Program.GetUrl(options); | ||
|
||
Assert.That(url, Is.EqualTo("http://reporting.company.com:8080/ReportServer/ReportService2010.asmx")); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters