private WebData GetData(Boolean refresh) { if (_data.IsNull() || refresh) { _data = new WebData(); _data.DataFields = WebDataFieldListExtensionTest.GetOneDataFieldList(); } return(_data); }
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); }