Skip to content

Commit

Permalink
staclink tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed May 25, 2021
1 parent bc96bf7 commit 7b17d7f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
27 changes: 27 additions & 0 deletions src/DotNetStac.Test/StacLink/StacLinkTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using GeoJSON.Net;
using GeoJSON.Net.Geometry;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Xunit;

namespace Stac.Test.Item
{
public class StacLinkTests : TestBase
{
[Fact]
public void CreateHelpers()
{
StacLink.CreateDerivedFromLink(new Uri("file:///test"));
StacLink.CreateAlternateLink(new Uri("file:///test"));
StacLink.CreateChildLink(new Uri("file:///test"));
var stacLink = StacLink.CreateItemLink(new Uri("file:///test"), "text/plain");
stacLink.Title = "test";
var cloned = new StacLink(stacLink);
Assert.Equal(stacLink, cloned);
cloned = stacLink.Clone();
Assert.Equal(stacLink, cloned);
}
}
}
6 changes: 0 additions & 6 deletions src/DotNetStac/StacLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ public StacLink(Uri uri)
Uri = uri;
}

public StacLink(Uri uri, IStacObject hostObject)
{
this.Uri = uri;
this.Parent = hostObject;
}

public StacLink(Uri uri, string relationshipType, string title, string mediaType, ulong contentLength = 0)
{
Uri = uri;
Expand Down

0 comments on commit 7b17d7f

Please sign in to comment.