Ejemplo n.º 1
0
        public void Session_fills_id_and_revision_when_saving_document_subclassed_entities()
        {
            // http://code.google.com/p/relax-net/issues/detail?id=7
            var s = _cx.CreateSession(_sx.Database);
            var x = new DocumentSubclass();

            s.Save(x);
            Assert.That(x.Id, Is.Not.Empty);
            Assert.That(x.Revision, Is.Not.Empty);
        }
Ejemplo n.º 2
0
        public void Session_fills_id_and_revision_when_loading_document_subclassed_entities()
        {
            // http://code.google.com/p/relax-net/issues/detail?id=7
            var s = _cx.CreateSession(_sx.Database);
            var x = new DocumentSubclass();

            s.Save(x);

            var t = _cx.CreateSession(_sx.Database);
            var y = t.Load <DocumentSubclass>(x.Id);

            Assert.That(y.Id, Is.EqualTo(x.Id));
            Assert.That(y.Revision, Is.EqualTo(x.Revision));
        }
Ejemplo n.º 3
0
        public void Session_uses_id_when_saving_document_subclassed_entities()
        {
            // http://code.google.com/p/relax-net/issues/detail?id=7
            var s = _cx.CreateSession(_sx.Database);
            var x = new DocumentSubclass()
            {
                Name = "foo", Id = "foo-document-subclass"
            };

            s.Save(x);
            var y = s.Load <DocumentSubclass>("foo-document-subclass");

            Assert.That(y, Is.SameAs(x));
        }
Ejemplo n.º 4
0
        public void Session_fills_id_and_revision_when_loading_document_subclassed_entities()
        {
            // http://code.google.com/p/relax-net/issues/detail?id=7
            var s = _cx.CreateSession(_sx.Database);
            var x = new DocumentSubclass();
            s.Save(x);

            var t = _cx.CreateSession(_sx.Database);
            var y = t.Load<DocumentSubclass>(x.Id);

            Assert.That(y.Id, Is.EqualTo(x.Id));
            Assert.That(y.Revision, Is.EqualTo(x.Revision));
        }
Ejemplo n.º 5
0
 public void Session_fills_id_and_revision_when_saving_document_subclassed_entities()
 {
     // http://code.google.com/p/relax-net/issues/detail?id=7
     var s = _cx.CreateSession(_sx.Database);
     var x = new DocumentSubclass();
     s.Save(x);
     Assert.That(x.Id, Is.Not.Empty);
     Assert.That(x.Revision, Is.Not.Empty);
 }
Ejemplo n.º 6
0
 public void Session_uses_id_when_saving_document_subclassed_entities()
 {
     // http://code.google.com/p/relax-net/issues/detail?id=7
     var s = _cx.CreateSession(_sx.Database);
     var x = new DocumentSubclass() {Name = "foo", Id = "foo-document-subclass"};
     s.Save(x);
     var y = s.Load<DocumentSubclass>("foo-document-subclass");
     Assert.That(y, Is.SameAs(x));
 }