add test case for pet equal

This commit is contained in:
wing328
2015-11-21 15:16:38 +08:00
parent 1ce3b67aa4
commit a8119049ad
12 changed files with 57 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
@@ -72,12 +73,17 @@ namespace {{packageName}}.Model
if (other == null)
return false;
return {{#vars}}
return {{#vars}}{{#isNotContainer}}
(
this.{{name}} == other.{{name}} ||
this.{{name}} != null &&
this.{{name}}.Equals(other.{{name}})
){{#hasMore}} && {{/hasMore}}{{/vars}};
){{#hasMore}} && {{/hasMore}}{{/isNotContainer}}{{^isNotContainer}}
(
this.{{name}} == other.{{name}} ||
this.{{name}} != null &&
this.{{name}}.SequenceEqual(other.{{name}})
){{#hasMore}} && {{/hasMore}}{{/isNotContainer}}{{/vars}};
}
/// <summary>