This repository has been archived by the owner on Oct 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- To cover the functionality of the get_domain_from_host method
- Loading branch information
Showing
3 changed files
with
42 additions
and
8 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
33 changes: 33 additions & 0 deletions
33
....tests/infrastructure.app/IconUrlNotSameDomainAsProjectUrlDomainorRawGitGuidelineSpecs.cs
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,33 @@ | ||
namespace chocolatey.package.validator.tests.infrastructure.app | ||
{ | ||
using chocolatey.package.validator.infrastructure.app.rules; | ||
using Should; | ||
|
||
public abstract class IconUrlNotSameDomainAsProjectUrlDomainorRawGitGuidelineSpecsBase : TinySpec | ||
{ | ||
protected IconUrlNotSameDomainAsProjectUrlDomainOrRawGitGuideline iconGuideline; | ||
|
||
public override void Context() | ||
{ | ||
iconGuideline = new IconUrlNotSameDomainAsProjectUrlDomainOrRawGitGuideline(); | ||
} | ||
} | ||
|
||
public class when_extracting_domain_from_host : IconUrlNotSameDomainAsProjectUrlDomainorRawGitGuidelineSpecsBase | ||
{ | ||
private string result; | ||
|
||
public override void Because() | ||
{ | ||
result = iconGuideline.get_domain_from_host("www.test.com"); | ||
} | ||
|
||
[Fact] | ||
public void should_return_domain() | ||
{ | ||
Context(); | ||
|
||
result.ShouldEqual("test.com"); | ||
} | ||
} | ||
} |
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