コード例 #1
0
 private WebData GetData(Boolean refresh)
 {
     if (_data.IsNull() || refresh)
     {
         _data            = new WebData();
         _data.DataFields = WebDataFieldListExtensionTest.GetOneDataFieldList();
     }
     return(_data);
 }
コード例 #2
0
        public void DataFields()
        {
            List <WebDataField> dataFields;

            // Test no data fields.
            GetData(true).DataFields = null;
            Assert.IsNull(GetData().DataFields);

            // Test some data fields.
            dataFields           = WebDataFieldListExtensionTest.GetOneDataFieldList();
            GetData().DataFields = dataFields;
            Assert.IsTrue(GetData().DataFields.IsNotEmpty());
            Assert.AreEqual(dataFields.Count, GetData().DataFields.Count);
        }