public void LastIndexOfTest() { var document = new CsvDocument <Person>(new Person[] { new Person { Name = "Akari", Age = 20 }, new Person { Name = "Kyoko", Age = 21 }, new Person { Name = "Yui", Age = 22 }, new Person { Name = "Chinatsu", Age = 19 } }); Assert.AreEqual(0, document.LastIndexOf(new Person { Name = "Akari", Age = 20 })); Assert.AreEqual(1, document.LastIndexOf(new Person { Name = "Kyoko", Age = 21 })); Assert.AreEqual(2, document.LastIndexOf(new Person { Name = "Yui", Age = 22 })); Assert.AreEqual(3, document.LastIndexOf(new Person { Name = "Chinatsu", Age = 19 })); Assert.AreEqual(-1, document.LastIndexOf(new Person { Name = "Ayano", Age = 19 })); }