public void ToKey_DifferentInstance()
 {
     var mapper = new ReflectionDocumentMapper<ReflectedDocument>(LuceneVersion.LUCENE_30);
     var key1 = mapper.ToKey(new ReflectedDocument { Id = "x", Version = new Version("1.0") });
     var key2 = mapper.ToKey(new ReflectedDocument { Id = "x", Version = new Version("1.0") });
     Assert.That(key1, Is.Not.SameAs(key2));
 }
 public void ToKey_NotEqual()
 {
     var mapper = new ReflectionDocumentMapper<ReflectedDocument>(LuceneVersion.LUCENE_30);
     var key1 = mapper.ToKey(new ReflectedDocument { Id = "x", Version = new Version("1.0") });
     var key2 = mapper.ToKey(new ReflectedDocument { Id = "y", Version = new Version("2.0") });
     Assert.That(key1, Is.Not.EqualTo(key2));
 }
 public void ToKey_NotEqual()
 {
     var mapper = new ReflectionDocumentMapper<ReflectedDocument>();
     var key1 = mapper.ToKey(new ReflectedDocument { Version = new Version("1.0") });
     var key2 = mapper.ToKey(new ReflectedDocument { Version = new Version("2.0") });
     Assert.That(key1, Is.Not.EqualTo(key2));
 }
 public void ToKey_Equal()
 {
     var mapper = new ReflectionDocumentMapper<ReflectedDocument>();
     var key1 = mapper.ToKey(new ReflectedDocument());
     var key2 = mapper.ToKey(new ReflectedDocument());
     Assert.That(key1, Is.EqualTo(key2));
 }
 public void ToKey_DifferentInstance()
 {
     var mapper = new ReflectionDocumentMapper<ReflectedDocument>();
     var key1 = mapper.ToKey(new ReflectedDocument());
     var key2 = mapper.ToKey(new ReflectedDocument());
     Assert.That(key1, Is.Not.SameAs(key2));
 }
Esempio n. 6
0
        public void ToKey_Equal()
        {
            var mapper = new ReflectionDocumentMapper <ReflectedDocument>();
            var key1   = mapper.ToKey(new ReflectedDocument());
            var key2   = mapper.ToKey(new ReflectedDocument());

            Assert.That(key1, Is.EqualTo(key2));
        }
Esempio n. 7
0
        public void ToKey_DifferentInstance()
        {
            var mapper = new ReflectionDocumentMapper <ReflectedDocument>();
            var key1   = mapper.ToKey(new ReflectedDocument());
            var key2   = mapper.ToKey(new ReflectedDocument());

            Assert.That(key1, Is.Not.SameAs(key2));
        }
Esempio n. 8
0
        public void ToKey_NotEqual()
        {
            var mapper = new ReflectionDocumentMapper <ReflectedDocument>(LuceneVersion.LUCENE_30);
            var key1   = mapper.ToKey(new ReflectedDocument {
                Id = "x", Version = new Version("1.0")
            });
            var key2 = mapper.ToKey(new ReflectedDocument {
                Id = "y", Version = new Version("2.0")
            });

            Assert.That(key1, Is.Not.EqualTo(key2));
        }
Esempio n. 9
0
        public void ToKey_DifferentInstance()
        {
            var mapper = new ReflectionDocumentMapper <ReflectedDocument>(LuceneVersion.LUCENE_30);
            var key1   = mapper.ToKey(new ReflectedDocument {
                Id = "x", Version = new Version("1.0")
            });
            var key2 = mapper.ToKey(new ReflectedDocument {
                Id = "x", Version = new Version("1.0")
            });

            Assert.That(key1, Is.Not.SameAs(key2));
        }
Esempio n. 10
0
        public void ToKey_NotEqual()
        {
            var mapper = new ReflectionDocumentMapper <ReflectedDocument>();
            var key1   = mapper.ToKey(new ReflectedDocument {
                Version = new Version("1.0")
            });
            var key2 = mapper.ToKey(new ReflectedDocument {
                Version = new Version("2.0")
            });

            Assert.That(key1, Is.Not.EqualTo(key2));
        }
Esempio n. 11
0
        public void ToKey_NullSafe()
        {
            var mapper = new ReflectionDocumentMapper <ReflectedDocument>();
            var key    = mapper.ToKey(new ReflectedDocument());

            Assert.NotNull(key);
        }
Esempio n. 12
0
        public void ToKey_DocumentKeys()
        {
            var mapper = new ReflectionDocumentMapper <ReflectedDocumentWithKey>(LuceneVersion.LUCENE_30);

            mapper.ToKey(new ReflectedDocumentWithKey {
                Id = "x", Version = new Version("1.0")
            });
        }
Esempio n. 13
0
        public void ToKey_ThrowsOnNullValues()
        {
            var mapper = new ReflectionDocumentMapper <ReflectedDocument>(LuceneVersion.LUCENE_30);

            TestDelegate call = () => mapper.ToKey(new ReflectedDocument());

            Assert.That(call, Throws.InvalidOperationException);
        }
        public void ToKey_ThrowsOnNullValues()
        {
            var mapper = new ReflectionDocumentMapper<ReflectedDocument>(LuceneVersion.LUCENE_30);

            TestDelegate call = () => mapper.ToKey(new ReflectedDocument());

            Assert.That(call, Throws.InvalidOperationException);
        }
        public void ToKey_DocumentKeys()
        {
            var mapper = new ReflectionDocumentMapper<ReflectedDocumentWithKey>(LuceneVersion.LUCENE_30);

            mapper.ToKey(new ReflectedDocumentWithKey { Id = "x", Version = new Version("1.0") });
        }
 public void ToKey_NullSafe()
 {
     var mapper = new ReflectionDocumentMapper<ReflectedDocument>();
     var key = mapper.ToKey(new ReflectedDocument());
     Assert.NotNull(key);
 }