private void PopulateTestingFields() { _mockMetadataFile = TestClassFactory.GetMockMetadataFileWithSomeNullDummyValues(); _mockSystemFile = TestClassFactory.GetMockSystemFileWithDummyValues(); _tableForMockMetadataFile = TestClassFactory.GetDataTable(_mockMetadataFile); _tableForMockSystemFile = TestClassFactory.GetDataTable(_mockSystemFile); }
public void ToList_Test_ReturnsMatchingObjectGivenInputWithNotNullNullableTypes() { _table = TestClassFactory.GetDataTable(_mockMetadataFileWithNoNullValues); var list = _table.ToList <MockMetadataFile>(); Assert.IsTrue(_mockMetadataFileWithNoNullValues.Equals(list[0])); }
public void ToList_Test_ReturnsPopulatedObjectInListGivenInputWithNotNullNullablePropertyTypes() { _table = TestClassFactory.GetDataTable(_mockMetadataFileWithNoNullValues); var list = _table.ToList <MockMetadataFile>(); Assert.IsFalse(HelperMethodsForTesting.HasANullablePropertyWithNullValue(list[0])); }
public async Task ToListAsync_Test_ReturnsMatchingObjectGivenInputWithNullNullableTypes() { _table = TestClassFactory.GetDataTable(_mockMetadataFileWithNullValues); var list = await _table.ToListAsync <MockMetadataFile>(); Assert.IsTrue(_mockMetadataFileWithNullValues.Equals(list[0])); }
public async Task ToListAsync_Test_ReturnsPopulatedObjectInListGivenInputWithNullNullablePropertyTypes() { _table = TestClassFactory.GetDataTable(_mockMetadataFileWithNullValues); var list = await _table.ToListAsync <MockMetadataFile>(); Assert.IsTrue(HelperMethodsForTesting.HasANullablePropertyWithNullValue(list[0])); }
public void ToObject_Test_ReturnsMatchingObjectGivenInputWithNoNullablePropertyTypes() { var mockSystemFile = TestClassFactory.GetMockSystemFileWithDummyValues(); var table = TestClassFactory.GetDataTable(mockSystemFile); var returnedObject = table.Rows[0].ToObject <MockSystemFile>(); Assert.IsTrue(mockSystemFile.Equals(returnedObject)); }
public void ToList_Test_ReturnsPopulatedObjectInListGivenInputWithNoNullablePropertyTypes() { var mockSystemFile = TestClassFactory.GetMockSystemFileWithDummyValues(); _table = TestClassFactory.GetDataTable(mockSystemFile); var list = _table.ToList <MockSystemFile>(); Assert.IsFalse(HelperMethodsForTesting.PropertiesAreSetToDefaultValues(list[0])); }
protected override void OnStart() { //Create some data to test some features int number = 0; for (int i = 0; i < number; i++) { TestClassFactory.CreateScorePartie(); } }