-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from digirati-co-uk/feature/imageservice
Updates related to ImageService3
- Loading branch information
Showing
11 changed files
with
146 additions
and
44 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
38 changes: 38 additions & 0 deletions
38
src/IIIF/IIIF.Tests/Serialisation/ImageService3SerialiserTests.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 IIIF.ImageApi.Service; | ||
using IIIF.Serialisation; | ||
using Xunit; | ||
|
||
namespace IIIF.Tests.Serialisation | ||
{ | ||
public class ImageService3SerialiserTests | ||
{ | ||
[Fact] | ||
public void WriteJson_OutputsExpected_IfNoProfileOrProfileDescription() | ||
{ | ||
// Arrange | ||
var imageService = new ImageService3 { Id = "foo" }; | ||
const string expected = "{\n \"id\": \"foo\",\n \"type\": \"ImageService3\"\n}"; | ||
|
||
// Act | ||
var result = imageService.AsJson().Replace("\r\n", "\n"); | ||
|
||
// Assert | ||
result.Should().Be(expected); | ||
} | ||
|
||
[Fact] | ||
public void WriteJson_OutputsExpected_ProfileOnly() | ||
{ | ||
// Arrange | ||
var imageService = new ImageService3 { Id = "foo", Profile = "bar" }; | ||
const string expected = "{\n \"id\": \"foo\",\n \"type\": \"ImageService3\",\n \"profile\": \"bar\"\n}"; | ||
|
||
// Act | ||
var result = imageService.AsJson().Replace("\r\n", "\n"); | ||
|
||
// Assert | ||
result.Should().Be(expected); | ||
} | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using System; | ||
using System.Linq; | ||
using IIIF.Presentation.V3; | ||
using IIIF.Utils; | ||
using Newtonsoft.Json; | ||
|