public void ConvertCornerCases() { Row r = new MockRow(new Dictionary <string, string> { { "Field", "abc" }, { "Private", "abc" }, { "Readonly", "abc" } // can't be set. }); RowType result = r.As <RowType>(); Assert.Equal(0, result.Age); // missing Assert.Equal(string.Empty, result.Missing); Assert.Null(result.GetPrivate()); Assert.Null(result.Field); }