Пример #1
0
        public void Verify_list_are_equal()
        {
            var fields1 = new FieldList();

            fields1.Add(Field.Builder <Primitive>().Id("field1").DataType(SchemaDataType.Primitive).IsNullable().Build());
            fields1.Add(Field.Builder <Primitive>().Id("field2").DataType(SchemaDataType.Primitive).IsNullable().Build());
            fields1.Add(Field.Builder <Primitive>().Id("field3").DataType(SchemaDataType.Primitive).IsNullable().Build());
            fields1.Add(Field.Builder <Primitive>().Id("field4").DataType(SchemaDataType.Primitive).IsNullable().Build());
            fields1.Add(Field.Builder <Primitive>().Id("field5").DataType(SchemaDataType.Primitive).IsNullable().Build());

            var fields2 = new FieldList();

            fields2.Add(Field.Builder <Primitive>().Id("field1").DataType(SchemaDataType.Primitive).IsNullable().Build());
            fields2.Add(Field.Builder <Primitive>().Id("field2").DataType(SchemaDataType.Primitive).IsNullable().Build());
            fields2.Add(Field.Builder <Primitive>().Id("field3").DataType(SchemaDataType.Primitive).IsNullable().Build());
            fields2.Add(Field.Builder <Primitive>().Id("field4").DataType(SchemaDataType.Primitive).IsNullable().Build());
            fields2.Add(Field.Builder <Primitive>().Id("field5").DataType(SchemaDataType.Primitive).IsNullable().Build());

            Assert.IsTrue(fields1.Equals(fields2));
        }
Пример #2
0
 public bool Equals(Structure other)
 {
     return(name == other.name && nameHash == other.nameHash && unknown08 == other.unknown08 &&
            size == other.size && fieldTablePosition == other.fieldTablePosition && fieldList.Equals(other.fieldList));
 }