public void Override_Resources() { resource["Language", "Group", "Key"] = "existing resource"; resource.Override("Language", @"{ ""Group"": { ""Test"": ""test"", ""Key"": ""new resource"" } }"); Assert.Equal("new resource", resource["Language", "Group", "Key"]); Assert.Equal("test", resource["Language", "Group", "Test"]); }
public void Inherit_Resources() { ResourceSet fallbacks = new ResourceSet(); resource["Language", "Group", "Key"] = "existing resource"; fallbacks.Override("Language", @"{ ""Group"": { ""Test"": ""test"", ""Key"": ""fallback resource"" } }"); resource.Inherit(fallbacks); Assert.Equal("existing resource", resource["Language", "Group", "Key"]); Assert.Equal("test", resource["Language", "Group", "Test"]); }