public void ReturnOnlyImplicitResourceKeysWithCulturesSetAsFilter_WhenGetImplicitResourcesKeysIsCalled()
        {
            var availableResources = new List <LocalizationEntry>();

            availableResources.Add(new LocalizationEntry()
            {
                Key   = "Key1",
                Value = "Val1"
            });

            availableResources.Add(new LocalizationEntry()
            {
                Key   = "Label.Key1",
                Value = "Val1"
            });

            availableResources.Add(new LocalizationEntry()
            {
                Key     = "Label.Key1",
                Value   = "Val2",
                Culture = "de"
            });

            availableResources.Add(new LocalizationEntry()
            {
                Key     = "Literal.Key1",
                Value   = "Val2",
                Culture = "de"
            });

            var locResProvider = new LocalResourceProvider2Wrapper("~/file", availableResources);
            var implicitKeys   = locResProvider.GetImplicitResourceKeys("Label") as List <ImplicitResourceKey>;

            Assert.AreEqual(2, implicitKeys.Count);

            var key1 = implicitKeys[0];

            Assert.AreEqual("Label", key1.KeyPrefix);
            Assert.AreEqual("Key1", key1.Property);
            Assert.AreEqual("", key1.Filter);

            var key2 = implicitKeys[1];

            Assert.AreEqual("Label", key2.KeyPrefix);
            Assert.AreEqual("Key1", key2.Property);
            Assert.AreEqual("de", key2.Filter);
        }
        public void ReturnOnlyImplicitResourceKeysWithCulturesSetAsFilter_WhenGetImplicitResourcesKeysIsCalled()
        {
            var availableResources = new List<LocalizationEntry>();
            availableResources.Add(new LocalizationEntry()
            {
                Key = "Key1",
                Value = "Val1"
            });

            availableResources.Add(new LocalizationEntry()
            {
                Key = "Label.Key1",
                Value = "Val1"
            });

            availableResources.Add(new LocalizationEntry()
            {
                Key = "Label.Key1",
                Value = "Val2",
                Culture = "de"
            });

            availableResources.Add(new LocalizationEntry()
            {
                Key = "Literal.Key1",
                Value = "Val2",
                Culture = "de"
            });

            var locResProvider = new LocalResourceProvider2Wrapper("~/file", availableResources);
            var implicitKeys = locResProvider.GetImplicitResourceKeys("Label") as List<ImplicitResourceKey>;

            Assert.AreEqual(2, implicitKeys.Count);

            var key1 = implicitKeys[0];
            Assert.AreEqual("Label", key1.KeyPrefix);
            Assert.AreEqual("Key1", key1.Property);
            Assert.AreEqual("", key1.Filter);

            var key2 = implicitKeys[1];
            Assert.AreEqual("Label", key2.KeyPrefix);
            Assert.AreEqual("Key1", key2.Property);
            Assert.AreEqual("de", key2.Filter);
        }