Esempio n. 1
0
        public void Equivalence_OnlyValues()
        {
            var schema1 = new Concrete.Schema();

            schema1.AddCreate("Alpha");
            schema1.AddCreate("Beta");

            var record1 = new Concrete.Record(schema1);

            record1[0] = "Cero";
            record1[1] = "One";

            var schema2 = new Concrete.Schema();

            schema2.AddCreate("Delta");
            schema2.AddCreate("Gamma");

            var record2 = new Concrete.Record(schema2);

            record2[0] = "Cero";
            record2[1] = "One";

            var res = record1.EquivalentTo(record2);

            Assert.IsFalse(res);

            res = record1.EquivalentTo(record2, onlyValues: true);
            Assert.IsTrue(res);
        }
Esempio n. 2
0
		public ISchema CreateSchema()
		{
			var schema = new Concrete.Schema();
			schema.Aliases.AddCreate("Employees", "Emp");
			schema.Aliases.AddCreate("Countries", "Ctry");

			schema.Add(new Concrete.SchemaEntry() { TableName = "Emp", ColumnName = "Id", IsPrimaryKeyColumn = true });
			schema.AddCreate("Emp", "FirstName");
			schema.AddCreate("LastName");
			schema.AddCreate("Ctry", "Id");

			return schema;
		}
Esempio n. 3
0
        public ISchema CreateSchema()
        {
            var schema = new Concrete.Schema();

            schema.Aliases.AddCreate("Employees", "Emp");
            schema.Aliases.AddCreate("Countries", "Ctry");

            schema.Add(new Concrete.SchemaEntry()
            {
                TableName = "Emp", ColumnName = "Id", IsPrimaryKeyColumn = true
            });
            schema.AddCreate("Emp", "FirstName");
            schema.AddCreate("LastName");
            schema.AddCreate("Ctry", "Id");

            return(schema);
        }
Esempio n. 4
0
		public void Equivalence_OnlyValues()
		{
			var schema1 = new Concrete.Schema();
			schema1.AddCreate("Alpha");
			schema1.AddCreate("Beta");

			var record1 = new Concrete.Record(schema1);
			record1[0] = "Cero";
			record1[1] = "One";

			var schema2 = new Concrete.Schema();
			schema2.AddCreate("Delta");
			schema2.AddCreate("Gamma");

			var record2 = new Concrete.Record(schema2);
			record2[0] = "Cero";
			record2[1] = "One";

			var res = record1.EquivalentTo(record2);
			Assert.IsFalse(res);

			res = record1.EquivalentTo(record2, onlyValues: true);
			Assert.IsTrue(res);
		}