Esempio n. 1
0
        public void ShouldReturnNullIfDoesNotExist()
        {
            var store = new FieldStore();

            var docId = Utils.RandomInteger();

            Assert.IsNull(store.GetValue(docId, Utils.RandomString()));

            store.SetValue(docId, Utils.RandomString(), Utils.RandomString());

            Assert.IsNull(store.GetValue(5, Utils.RandomString()));
        }
Esempio n. 2
0
        public void ShouldReturnValue()
        {
            var store = new FieldStore();

            var docId     = Utils.RandomInteger();
            var fieldName = Utils.RandomString();
            var value     = Utils.RandomString();

            store.SetValue(docId, fieldName, value);

            Assert.AreEqual(value, store.GetValue(docId, fieldName));
        }