-
Notifications
You must be signed in to change notification settings - Fork 0
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
13 changed files
with
2,555 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Collections.Generic; | ||
using GeoJSON.Net.Geometry; | ||
using Newtonsoft.Json; | ||
using Stac.Collection; | ||
using Stac.Common; | ||
using Xunit; | ||
|
||
namespace Stac.Test.Item | ||
{ | ||
public class PatchHelpersTests : TestBase | ||
{ | ||
[Fact] | ||
public void PatchStacItemTest() | ||
{ | ||
StacItem baseItem = StacConvert.Deserialize<StacItem>(GetJson("Common", "BaseItem")); | ||
|
||
StacItem patchItem = StacConvert.Deserialize<StacItem>(GetJson("Common", "Patch")); | ||
|
||
StacItem patchedItem = baseItem.Patch<StacItem>(patchItem); | ||
|
||
JsonAssert.AreEqual(GetJson("Common", "PatchedItem"), StacConvert.Serialize(patchedItem)); | ||
} | ||
|
||
[Fact] | ||
public void PatchStacItemTest2() | ||
{ | ||
StacItem baseItem = StacConvert.Deserialize<StacItem>(GetJson("Common", "BaseItem")); | ||
|
||
Patch patchItem = JsonConvert.DeserializeObject<Patch>(GetJson("Common", "Patch2")); | ||
|
||
StacItem patchedItem = baseItem.Patch<StacItem>(patchItem); | ||
|
||
JsonAssert.AreEqual(GetJson("Common", "PatchedItem2"), StacConvert.Serialize(patchedItem)); | ||
} | ||
} | ||
} |
Oops, something went wrong.