public void CreateInstanceScopedKeyString() { TestObject testObject = new TestObject(); string typeScopedKey = UniqueKey.GetInstanceScopedString(testObject, "PartialKey"); string expectedKey = string.Format("{0}[{1}].{2}", typeof(TestObject).FullName, testObject.GetHashCode(), "PartialKey"); Assert.AreEqual(expectedKey, typeScopedKey); }
public void MustNotCallObjectSignatureWithType() { Type myType = typeof(TestObject); Assert.Throws <ArgumentException>(() => UniqueKey.GetInstanceScopedString(myType, "PartialKey")); }
public void MustNotCallObjectSignatureWithType() { Type myType = typeof(TestObject); UniqueKey.GetInstanceScopedString((object)myType, "PartialKey"); }