public void EqualsObjectCastTest() { string fieldName = "test-fieldName"; DatasourceField datasourceField = new DatasourceField(fieldName: fieldName); object obj = new DatasourceField(fieldName: fieldName); Assert.True(datasourceField.Equals(obj)); }
public void EqualsTest() { string fieldName = "test-fieldName"; DatasourceField fieldName1 = new DatasourceField(fieldName: fieldName); Assert.Equal(fieldName1, fieldName1); Assert.Equal(fieldName1, new DatasourceField(fieldName: fieldName)); Assert.NotEqual(fieldName1, new DatasourceField(fieldName: fieldName + "1")); Assert.False(fieldName1.Equals(null)); }
public void GetHashcodeTest() { DatasourceField datasourceField1 = new DatasourceField(); datasourceField1.FieldName = "test-fieldName"; datasourceField1.Status = "test-status"; datasourceField1.FieldGroup = "test-fieldGroup"; datasourceField1.MatchPrecision = "test-matchPrecision"; DatasourceField datasourceField2 = new DatasourceField(); datasourceField2.FieldName = "test-fieldName"; datasourceField2.Status = "test-status"; datasourceField2.FieldGroup = "test-fieldGroup"; datasourceField2.MatchPrecision = "test-matchPrecision"; Assert.Equal(datasourceField1.GetHashCode(), datasourceField2.GetHashCode()); }
public DatasourceFieldTests() { datasourceField = new DatasourceField(); }