//------------------------------------------------------------------------- public virtual void test_equalsHashCodeToString() { CsvFile a1 = CsvFile.of(CharSource.wrap(CSV1), true); CsvFile a2 = CsvFile.of(CharSource.wrap(CSV1), true); CsvFile b = CsvFile.of(CharSource.wrap(CSV2), true); CsvFile c = CsvFile.of(CharSource.wrap(CSV3), false); // file assertEquals(a1.Equals(a1), true); assertEquals(a1.Equals(a2), true); assertEquals(a1.Equals(b), false); assertEquals(a1.Equals(c), false); assertEquals(a1.Equals(null), false); assertEquals(a1.Equals(ANOTHER_TYPE), false); assertEquals(a1.GetHashCode(), a2.GetHashCode()); assertNotNull(a1.ToString()); // row assertEquals(a1.row(0).Equals(a1.row(0)), true); assertEquals(a1.row(0).Equals(a2.row(0)), true); assertEquals(a1.row(0).Equals(b.row(0)), false); assertEquals(c.row(0).Equals(c.row(1)), false); assertEquals(a1.row(0).Equals(ANOTHER_TYPE), false); assertEquals(a1.row(0).Equals(null), false); assertEquals(a1.row(0).GetHashCode(), a2.row(0).GetHashCode()); assertNotNull(a1.row(0).ToString()); }