public void GenerateCollectionItemIdentifiers_zero_primary_key() { Tuple <string, object>[] primaryKeys = new Tuple <string, object>[] { new Tuple <string, object>("ZeroKey", 0) }; string guid = Guid.NewGuid().ToString(); string identifiers = U.GenerateCollectionItemIdentifiers(primaryKeys, guid); Assert.AreEqual("Guid=" + guid, identifiers); }
public void GenerateCollectionItemIdentifiers_non_null_non_zero_primary_keys() { Tuple <string, object> nonZeroKey = new Tuple <string, object>("NonZeroKey", 1); Tuple <string, object>[] primaryKeys = new Tuple <string, object>[] { nonZeroKey }; string guid = Guid.NewGuid().ToString(); string identifiers = U.GenerateCollectionItemIdentifiers(primaryKeys, guid); Assert.AreEqual(nonZeroKey.Item1 + "=" + nonZeroKey.Item2, identifiers); }
public void GenerateCollectionItemIdentifiers_null_and_non_null_primary_key() { Tuple <string, object> nonNullKey = new Tuple <string, object>("NonNullKey", 1); Tuple <string, object>[] primaryKeys = new Tuple <string, object>[] { new Tuple <string, object>("NullKey", null), nonNullKey }; string guid = Guid.NewGuid().ToString(); string identifiers = U.GenerateCollectionItemIdentifiers(primaryKeys, guid); Assert.AreEqual("Guid=" + guid + "," + nonNullKey.Item1 + "=" + nonNullKey.Item2, identifiers); }