Skip to content

Commit

Permalink
PropertyObservableCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Jul 5, 2021
1 parent 220fb89 commit 7fa3967
Show file tree
Hide file tree
Showing 9 changed files with 731 additions and 17 deletions.
20 changes: 20 additions & 0 deletions src/DotNetStac.Test/Item/ItemTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,5 +321,25 @@ public void ItemClone()

JsonAssert.AreEqual(simpleJson, expectedJson);
}

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

simpleItem.Providers.Add(new StacProvider("ESA", new StacProviderRole[] { StacProviderRole.licensor }));

Assert.Contains<string, object>("providers", simpleItem.Properties);

simpleItem.Providers.RemoveAt(0);

Assert.DoesNotContain<string, object>("providers", simpleItem.Properties);

var newJson = StacConvert.Serialize(simpleItem);
ValidateJson(newJson);

}
}
}
Loading

0 comments on commit 7fa3967

Please sign in to comment.