public void GivenTable_WhenRetrievePersonsBelongToCityOrState_ShouldReturnDataTable()
        {
            DataRow row = addressBook.AddressBook.NewRow();

            row["FirstName"]   = "Sam";
            row["LastName"]    = "Sher";
            row["Address"]     = "kondhwa";
            row["City"]        = "Pune";
            row["State"]       = "State";
            row["Zip"]         = "111 222";
            row["PhoneNumber"] = "91 2837373737";
            row["Email"]       = "*****@*****.**";
            DataTable table = addressBook.RetrievePersonsFromCityOrState("City", "Pune");

            Assert.AreEqual(row["City"], table.Rows[0]["City"]);
        }
Esempio n. 2
0
        public void GivenTable_WhenRetrievePersonsBelongToCityOrState_ShouldReturnDataTable()
        {
            DataRow row = addressBook.AddressBook.NewRow();

            row["FirstName"]   = "Prachi";
            row["LastName"]    = "Gore";
            row["Address"]     = "Shivajinagr";
            row["City"]        = "Pune";
            row["State"]       = "Maharashtra";
            row["Zip"]         = "411 222";
            row["PhoneNumber"] = "91 8564123737";
            row["Email"]       = "*****@*****.**";

            DataTable table = addressBook.RetrievePersonsFromCityOrState("City", "Pune");

            Assert.AreEqual(row["City"], table.Rows[0]["City"]);
        }