Ejemplo n.º 1
0
        public void T3_T4_Insert_Read()
        {
            var  original = new Testdata(1);
            Guid guid;

            using (var db = NewDB("t3_t4"))
            {
                guid = db.Insert(original);
            }

            using (var db = OpenDB("t3_t4"))
            {
                Testdata read = db.Read <Testdata>(guid);

                original.Should().BeEquivalentTo(read);
            }
        }
Ejemplo n.º 2
0
        public void T5_Update()
        {
            var  original = new Testdata(1);
            Guid guid;

            using (var db = NewDB("t5"))
            {
                guid = db.Insert(original);

                original.Value = 2;
                db.Update(guid, original);
            }

            using (var db = OpenDB("t5"))
            {
                Testdata read = db.Read <Testdata>(guid);

                original.Should().BeEquivalentTo(read);
            }
        }