Ejemplo n.º 1
0
        public void InstantiatedCollectionWithDocument_GetIndexedValuesInternal_ShouldReturnDefaultAndCustom()
        {
            var collection = new TestCollection(_documentsStore);
            var doc        = new Document <TestContent>(new TestContent("id", 5));

            collection.Add(doc);

            var indexedValues = collection.GetIndexedValues(doc);

            Assert.True(indexedValues.ContainsKey(Collection.IdKey));
            Assert.True(indexedValues.ContainsKey(Collection.DocumentKey));
            Assert.True(indexedValues.ContainsKey(nameof(TestContent.AnyNumber)));

            Assert.NotNull(indexedValues[Collection.DocumentKey]);
            Assert.NotSame(string.Empty, indexedValues[Collection.DocumentKey]);
        }