public void ModelExtensions_GetIdValueOnModelWithComplexIdProperty_ShouldWork() { var entity = new ModelWithComplexIdProperty { ComplexId = 1 }; var id = int.Parse(entity.GetIdValue().ToString()); Assert.AreEqual(entity.ComplexId, id, "Id should be 1."); }
public void ModelExtensions_GetIdValueOnModelWithComplexIdProperty_ShouldWork() { // Arrange var entity = new ModelWithComplexIdProperty { ComplexId = 1, }; // Act var id = int.Parse(entity.GetIdValue().ToString(), CultureInfo.InvariantCulture); // Assert Assert.AreEqual(entity.ComplexId, id); }