public void GetObjectIdTest() { var objectId = new ObjectId(); var product = new DiaryProduct(new ClassId(""), objectId); GetObjectIdTest(product, objectId); }
/// <summary> /// Tests the ObjectId method using polymorphism. /// </summary> public void GetObjectIdTest(DiaryProduct product, ObjectId objectId) { var actual = product.GetObjectId(); Assert.AreEqual(objectId.AsInt(), actual.AsInt(), "Data"); Assert.AreEqual(objectId.GetHashCode(), actual.GetHashCode(), "Identity"); }
public void GetClassIdTest() { var className = "Fonzie"; var classId = new ClassId(className); var product = new DiaryProduct(classId, new ObjectId()); GetClassIdTest(product, className); }
/// <summary> /// Tests GetClassId method using polymorphism. /// </summary> internal void GetClassIdTest(DiaryProduct product, String className) { var classId = product.GetClassId(); var productClassId = new ClassId(className); var expected = 0; var actual = classId.CompareTo(productClassId); Assert.AreEqual(expected, actual); }