protected Guid InternalIdAccessor(PSSurfaceCurve surfaceCurve) { PropertyInfo propertyInfo = surfaceCurve.GetType().GetProperty("InternalId", BindingFlags.NonPublic | BindingFlags.Instance); return((Guid)propertyInfo.GetValue(surfaceCurve, null)); }
/// <summary> /// A test for Identifier /// </summary> public void IdentifierTest(string expectedIdentifier) { // Get first surface curve PSSurfaceCurve surfaceCurve = _surfaceCurves[0]; // Check that the collection Identifier matches the entity type string actualIdentifier = (string)surfaceCurve .GetType().GetProperty("Identifier", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(surfaceCurve, null); Assert.AreEqual(expectedIdentifier, actualIdentifier); }