public void ReadAllTCanSetFieldsFromNullForDictionaryBasedTypes()
        {
            var db = new FakeDB();
            var row = new Dictionary<string, object> { { "Name", "foosums" } };
            db.Insert("test", row);

            // Previously, the way we did this was to write this as:
            // obj = db.ReadAll("test").Select(r => new DictBasedTestObject()._SetFrom(r)).Single();
            var obj = db.ReadAll<DictBasedTestObject>("test").Single();
            Assert.NotNull(obj);
            Assert.False(obj.IsSet);
            Assert.AreEqual("foosums", obj.Name);
        }
Exemple #2
0
 public void ReadAllFromNewTable()
 {
     var db = new FakeDB();
     Assert.AreEqual("()", db.ReadAll("foosums").Print());
 }