Skip to content

Commit

Permalink
projection shape and transform + tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Nov 22, 2021
1 parent f5c52cd commit 0b403b8
Show file tree
Hide file tree
Showing 6 changed files with 1,368 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

<h3 align="center">

![Build Status](https://github.com/Terradue/DotNetStac/actions/workflows/build.yaml/badge.svg?branch=hotfix/1.1.3)
![Build Status](https://github.com/Terradue/DotNetStac/actions/workflows/build.yaml/badge.svg?branch=develop)
[![NuGet](https://img.shields.io/nuget/vpre/DotNetStac)](https://www.nuget.org/packages/DotNetStac/)
[![codecov](https://codecov.io/gh/Terradue/DotNetStac/branch/hotfix/1.1.3/graph/badge.svg)](https://codecov.io/gh/Terradue/DotNetStac)
[![codecov](https://codecov.io/gh/Terradue/DotNetStac/branch/develop/graph/badge.svg)](https://codecov.io/gh/Terradue/DotNetStac)
[![Gitter](https://img.shields.io/gitter/room/SpatioTemporal-Asset-Catalog/Lobby?color=yellow)](https://gitter.im/SpatioTemporal-Asset-Catalog/Lobby)
[![License](https://img.shields.io/badge/license-AGPL3-blue.svg)](LICENSE)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Terradue/DotNetStac/master?filepath=example.ipynb)
Expand Down
21 changes: 21 additions & 0 deletions src/DotNetStac.Test/Item/ItemTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using GeoJSON.Net.Geometry;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Stac.Exceptions;
using Xunit;

namespace Stac.Test.Item
Expand Down Expand Up @@ -341,5 +342,25 @@ public void ItemProviders()
ValidateJson(newJson);

}

[Fact]
public void EmptyCollection()
{
var simpleJson = GetJson("Item", "EmptyCollectionIn");
StacItem simpleItem = JsonConvert.DeserializeObject<StacItem>(simpleJson);
var newJson = StacConvert.Serialize(simpleItem);
Assert.Throws<InvalidStacDataException>(() => ValidateJson(newJson));

}

[Fact]
public void ItemLinkExtensions()
{
var simpleJson = GetJson("Item", "ItemLinkExtensions");
ValidateJson(simpleJson);
StacItem simpleItem = StacConvert.Deserialize<StacItem>(simpleJson);

Assert.Equal("GET", simpleItem.Links.First().AdditionalProperties["method"]);
}
}
}
Loading

0 comments on commit 0b403b8

Please sign in to comment.