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)); }
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)); }
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_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>(); 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_NullSafe() { var mapper = new ReflectionDocumentMapper <ReflectedDocument>(); var key = mapper.ToKey(new ReflectedDocument()); Assert.NotNull(key); }
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_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); }