Ejemplo n.º 1
0
 public void index_maps_cells_correctly()
 {
     var row = new Row(_cells, _columnMappings);
     Assert.AreEqual(_cells[0], row[0]);
     Assert.AreEqual(_cells[1], row[1]);
     Assert.AreEqual(_cells[2], row[2]);
 }
Ejemplo n.º 2
0
 private void AddRow(string name, int price)
 {
     Row row = new Row();
     row["name"] = name;
     row["price"] = price;
     rows.Add(row);
 }
Ejemplo n.º 3
0
 public void column_name_index_maps_cells_correctly()
 {
     var row = new Row(_cells, _columnMappings);
     Assert.AreEqual(_cells[0], row["Name"]);
     Assert.AreEqual(_cells[1], row["Favorite Sport"]);
     Assert.AreEqual(_cells[2], row["Age"]);
 }
Ejemplo n.º 4
0
 protected void AddUser(string name, string email)
 {
     Row row = new Row();
     row["name"] = name;
     row["email"] = email;
     left.Add(row);
 }
Ejemplo n.º 5
0
 protected void AddPerson(int id, string email)
 {
     Row row = new Row();
     row["id"] = id;
     row["email"] = email;
     right.Add(row);
 }
Ejemplo n.º 6
0
        private static Row FillRow(string[] columns, object[] values)
        {
            Row row = new Row();

            for (int i = 0; i < values.Length; i++)
                row[columns[i]] = values[i];

            return row;
        }
Ejemplo n.º 7
0
        public void Should_not_take_casing_into_account_in_column_names()
        {
            Row first = new Row();
            first["A"] = 1;

            Row second = new Row();
            second["a"] = 1;

            Assert.IsTrue(first.Equals(second));
        }
Ejemplo n.º 8
0
        public void Nulls_are_equal()
        {
            Row first = new Row();
            first["a"] = null;

            Row second = new Row();
            second["a"] = null;

            Assert.IsTrue(first.Equals(second));
        }
Ejemplo n.º 9
0
        public void Incompatible_types_throw_invalid_operation_exception()
        {
            Row first = new Row();
            first["a"] = 1;

            Row second = new Row();
            second["a"] = "stringvalue";

            Assert.IsTrue(first.Equals(second));
        }
Ejemplo n.º 10
0
        public void Different_numeric_types_should_be_comparable_if_implicit_conversion_exists(object firstValue, object secondValue)
        {
            Row first = new Row();
            first["a"] = firstValue;

            Row second = new Row();
            second["a"] = secondValue;

            Assert.IsTrue(first.Equals(second));
        }
Ejemplo n.º 11
0
 public void invalid_column_name_index_throws_argument_exception()
 {
     var newRow = new Row(_cells, _columnMappings);
     var temp = newRow["First Name"];
 }