-
Notifications
You must be signed in to change notification settings - Fork 32
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
21 changed files
with
441 additions
and
23 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
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
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
File renamed without changes.
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
38 changes: 38 additions & 0 deletions
38
test/Our.Umbraco.GraphQL.Tests/Adapters/PublishedContent/Types/LinkTypeGraphTypeTests.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,38 @@ | ||
using FluentAssertions; | ||
using Our.Umbraco.GraphQL.Adapters.PublishedContent.Types; | ||
using Umbraco.Core.Models; | ||
using Xunit; | ||
|
||
namespace Our.Umbraco.GraphQL.Tests.Adapters.PublishedContent.Types | ||
{ | ||
public class ContentVariationTests | ||
{ | ||
[Fact] | ||
public void Ctor_SetsName() | ||
{ | ||
var sut = new ContentVariationGraphType(); | ||
|
||
sut.Name.Should().Be("ContentVariation"); | ||
} | ||
[Fact] | ||
public void Ctor_SetsDescription() | ||
{ | ||
var sut = new ContentVariationGraphType(); | ||
|
||
sut.Description.Should().Be("Indicates how values can vary."); | ||
} | ||
|
||
[Theory] | ||
[InlineData("NOTHING", ContentVariation.Nothing)] | ||
[InlineData("CULTURE", ContentVariation.Culture)] | ||
[InlineData("SEGMENT", ContentVariation.Segment)] | ||
[InlineData("CULTURE_AND_SEGMENT", ContentVariation.CultureAndSegment)] | ||
public void Ctor_AddsFields(string field, ContentVariation value) | ||
{ | ||
var sut = new ContentVariationGraphType(); | ||
|
||
sut.Values.Should().Contain(x => x.Name == field) | ||
.Which.Value.Should().Be(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
39 changes: 39 additions & 0 deletions
39
test/Our.Umbraco.GraphQL.Tests/Adapters/PublishedContent/Types/PublishedItemTypeGraphType.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,39 @@ | ||
using FluentAssertions; | ||
using Our.Umbraco.GraphQL.Adapters.PublishedContent.Types; | ||
using Umbraco.Core.Models.PublishedContent; | ||
using Xunit; | ||
|
||
namespace Our.Umbraco.GraphQL.Tests.Adapters.PublishedContent.Types | ||
{ | ||
public class PublishedItemTypeGraphTypeTests | ||
{ | ||
[Fact] | ||
public void Ctor_SetsName() | ||
{ | ||
var sut = new PublishedItemTypeGraphType(); | ||
|
||
sut.Name.Should().Be("PublishedItemType"); | ||
} | ||
[Fact] | ||
public void Ctor_SetsDescription() | ||
{ | ||
var sut = new PublishedItemTypeGraphType(); | ||
|
||
sut.Description.Should().Be("The type of published element."); | ||
} | ||
|
||
[Theory] | ||
[InlineData("CONTENT", PublishedItemType.Content)] | ||
[InlineData("ELEMENT", PublishedItemType.Element)] | ||
[InlineData("MEDIA", PublishedItemType.Media)] | ||
[InlineData("MEMBER", PublishedItemType.Member)] | ||
[InlineData("UNKNOWN", PublishedItemType.Unknown)] | ||
public void Ctor_AddsFields(string field, PublishedItemType value) | ||
{ | ||
var sut = new PublishedItemTypeGraphType(); | ||
|
||
sut.Values.Should().Contain(x => x.Name == field) | ||
.Which.Value.Should().Be(value); | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
test/Our.Umbraco.GraphQL.Tests/Adapters/PublishedContent/Types/UrlModeGraphTypeTests.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,39 @@ | ||
using FluentAssertions; | ||
using Our.Umbraco.GraphQL.Adapters.PublishedContent.Types; | ||
using Umbraco.Core.Models.PublishedContent; | ||
using Xunit; | ||
|
||
namespace Our.Umbraco.GraphQL.Tests.Adapters.PublishedContent.Types | ||
{ | ||
public class UrlModeGraphTypeTests | ||
{ | ||
[Fact] | ||
public void Ctor_SetsName() | ||
{ | ||
var sut = new UrlModeGraphType(); | ||
|
||
sut.Name.Should().Be("UrlMode"); | ||
} | ||
[Fact] | ||
public void Ctor_SetsDescription() | ||
{ | ||
var sut = new UrlModeGraphType(); | ||
|
||
sut.Description.Should() | ||
.Be("Specifies the type of urls that the url provider should produce, Auto is the default."); | ||
} | ||
|
||
[Theory] | ||
[InlineData("ABSOLUTE", UrlMode.Absolute)] | ||
[InlineData("AUTO", UrlMode.Auto)] | ||
[InlineData("DEFAULT", UrlMode.Default)] | ||
[InlineData("RELATIVE", UrlMode.Relative)] | ||
public void Ctor_AddsFields(string field, UrlMode value) | ||
{ | ||
var sut = new UrlModeGraphType(); | ||
|
||
sut.Values.Should().Contain(x => x.Name == field) | ||
.Which.Value.Should().Be(value); | ||
} | ||
} | ||
} |
Oops, something went wrong.