This repository has been archived by the owner on Dec 28, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
20 changed files
with
274 additions
and
159 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,35 @@ | ||
# Contribution Guidelines | ||
|
||
This repository uses [GitFlow] with default configuration. | ||
Development is happening on `develop` branch. | ||
|
||
To contribute: | ||
|
||
* Fork this repository. | ||
* Create a feature branch from `develop`. | ||
* Implement your changes. | ||
* Push your feature branch. | ||
* Create a pull request. | ||
|
||
## Build | ||
|
||
To build this package we are using Cake. | ||
|
||
On Windows PowerShell run: | ||
|
||
```powershell | ||
./build | ||
``` | ||
|
||
On OSX/Linux run: | ||
|
||
```bash | ||
./build.sh | ||
``` | ||
|
||
## Release | ||
|
||
See [Cake.Recipe documentation] how to create a new release of this addin. | ||
|
||
[GitFlow]: (http://nvie.com/posts/a-successful-git-branching-model/) | ||
[Cake.Recipe documentation]: https://cake-contrib.github.io/Cake.Recipe/docs/usage/creating-release |
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
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,63 @@ | ||
namespace Cake.Prca.Issues.InspectCode.Tests | ||
{ | ||
using Shouldly; | ||
using Xunit; | ||
|
||
public sealed class ExtensionsTests | ||
{ | ||
public sealed class TheToUriExtension | ||
{ | ||
[Fact] | ||
public void Should_Throw_If_Value_Is_Null() | ||
{ | ||
// Given | ||
string value = null; | ||
|
||
// When | ||
var result = Record.Exception(() => value.ToUri()); | ||
|
||
// Then | ||
result.IsArgumentNullException("value"); | ||
} | ||
|
||
[Fact] | ||
public void Should_Throw_If_Value_Is_Empty() | ||
{ | ||
// Given | ||
var value = string.Empty; | ||
|
||
// When | ||
var result = Record.Exception(() => value.ToUri()); | ||
|
||
// Then | ||
result.IsArgumentOutOfRangeException("value"); | ||
} | ||
|
||
[Fact] | ||
public void Should_Throw_If_Value_Is_WhiteSpace() | ||
{ | ||
// Given | ||
const string value = " "; | ||
|
||
// When | ||
var result = Record.Exception(() => value.ToUri()); | ||
|
||
// Then | ||
result.IsArgumentOutOfRangeException("value"); | ||
} | ||
|
||
[Fact] | ||
public void Should_Return_Uri() | ||
{ | ||
// Given | ||
const string value = "https://google.com/"; | ||
|
||
// When | ||
var result = value.ToUri(); | ||
|
||
// Then | ||
result.ToString().ShouldBe(value); | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.