示例#1
0
        static void CheckDataDriver(IDataDriver driver)
        {
            string id       = driver.Create(new { name = "Fabricio" });
            object original = driver.Read(id);

            bool wasUpdated = driver.Update(id, new { height = 10, width = 10 });

            object modified = driver.Read(id);

            bool wasDeleted = driver.Delete(id);
        }
示例#2
0
        public void Workflow()
        {
            string id       = driver.Create(MODEL);
            object original = driver.Read(id);

            Assert.Equal(original, MODEL);

            bool wasUpdated = driver.Update(id, new { height = 10, width = 10 });

            Assert.True(wasUpdated);

            object modified = driver.Read(id);

            Assert.NotEqual(modified, MODEL);

            bool wasDeleted = driver.Delete(id);

            Assert.True(wasDeleted);
        }