Beispiel #1
0
 public void TestEquals()
 {
     { //table name equality
         TableTwo ta = new TableTwo("rawa2");
         TableTwo tb = new TableTwo("rawa2");
         Assert.AreEqual(true, ta.Equals(tb));
     }
     { //table name inequality
         TableTwo ta = new TableTwo("rawa");
         TableTwo tb = new TableTwo("rawa2");
         Assert.AreEqual(false, ta.Equals(tb));
     }
     { //table field type equality
         TableTwo ta = new TableTwo("rawa");
         TableTwo tb = new TableTwo("rawa");
         ta.AddField <string>("string");
         tb.AddField <string>("string");
         Assert.AreEqual(true, ta.Equals(tb));
     }
     { //table field type inequality
         TableTwo ta = new TableTwo("rawa");
         TableTwo tb = new TableTwo("rawa");
         ta.AddField <string>("string");
         tb.AddField <int>("string");
         Assert.AreEqual(false, ta.Equals(tb));
     }
     { //row equality
         TableTwo ta = new TableTwo("rawa");
         TableTwo tb = new TableTwo("rawa");
         ta.AddField <string>("string");
         ta.CreateRow().Set("string", "hello");
         tb.AddField <string>("string");
         tb.CreateRow().Set("string", "hello");
         Assert.AreEqual(true, ta.Equals(tb));
     }
     { //row inequality
         TableTwo ta = new TableTwo("rawa");
         TableTwo tb = new TableTwo("rawa");
         ta.AddField <string>("string");
         ta.CreateRow().Set("string", "hello");
         tb.AddField <string>("string");
         tb.CreateRow().Set("string", "2hello");
         Assert.AreEqual(false, ta.Equals(tb));
     }
 }
Beispiel #2
0
 public void TestEquals()
 {
     { //table name equality
         TableTwo ta = new TableTwo("rawa2");
         TableTwo tb = new TableTwo("rawa2");
         Assert.AreEqual(true, ta.Equals(tb));
     }
     { //table name inequality
         TableTwo ta = new TableTwo("rawa");
         TableTwo tb = new TableTwo("rawa2");
         Assert.AreEqual(false, ta.Equals(tb));
     }
     { //table field type equality
         TableTwo ta = new TableTwo("rawa");
         TableTwo tb = new TableTwo("rawa");
         ta.AddField<string>("string");
         tb.AddField<string>("string");
         Assert.AreEqual(true, ta.Equals(tb));
     }
     { //table field type inequality
         TableTwo ta = new TableTwo("rawa");
         TableTwo tb = new TableTwo("rawa");
         ta.AddField<string>("string");
         tb.AddField<int>("string");
         Assert.AreEqual(false, ta.Equals(tb));
     }
     { //row equality
         TableTwo ta = new TableTwo("rawa");
         TableTwo tb = new TableTwo("rawa");
         ta.AddField<string>("string");
         ta.CreateRow().Set("string", "hello");
         tb.AddField<string>("string");
         tb.CreateRow().Set("string", "hello");
         Assert.AreEqual(true, ta.Equals(tb));
     }
     { //row inequality
         TableTwo ta = new TableTwo("rawa");
         TableTwo tb = new TableTwo("rawa");
         ta.AddField<string>("string");
         ta.CreateRow().Set("string", "hello");
         tb.AddField<string>("string");
         tb.CreateRow().Set("string", "2hello");
         Assert.AreEqual(false, ta.Equals(tb));
     }
 }