public void IFRS_LoadEnumerations() { TestTaxonomy_IFRS s = new TestTaxonomy_IFRS(); int errors = 0; s.Load( IFRS_FILE ); s.AllocateElementTable(); s.enumTable = new Hashtable(); s.LoadEnumerationsAndOtherExtendedDataTypes( out errors ); if ( errors > 0 ) { SendErrorsToConsole( s.errorList ); } Assert.AreEqual( "ifrs-gp", s.GetNSPrefix(), "prefix wrong" ); Assert.AreEqual( 0, errors, "wrong number of errors" ); Assert.AreEqual( 5, s.enumTable.Count, "wrong number of enumerations" ); Enumeration e1 = s.enumTable["ifrs-gp:CostValuationItemType"] as Enumeration; Assert.IsNotNull( e1, "CostValuationItemType not found" ); Assert.AreEqual( "xbrli:stringItemType", e1.RestrictionType, "CostValuationItemType restriction type is wrong" ); Assert.AreEqual( 2, e1.Values.Count, "CostValuationItemType wrong number of items" ); Assert.AreEqual( "Cost", e1.Values[0], "CostValuationItemType[0] is wrong" ); Assert.AreEqual( "Valuation", e1.Values[1], "CostValuationItemType[1] is wrong" ); Enumeration e4 = s.enumTable["ifrs-gp:RelatedPartyRelationshipTypeItemType"] as Enumeration; Assert.IsNotNull( e4, "RelatedPartyRelationshipTypeItemType not found" ); Assert.AreEqual( "xbrli:stringItemType", e4.RestrictionType, "RelatedPartyRelationshipTypeItemType restriction type is wrong" ); Assert.AreEqual( 7, e4.Values.Count, "RelatedPartyRelationshipTypeItemType wrong number of items" ); Assert.AreEqual( "Parent", e4.Values[0], "RelatedPartyRelationshipTypeItemType[0] is wrong" ); Assert.AreEqual( "JointControlOrSignificantInfluence", e4.Values[1], "RelatedPartyRelationshipTypeItemType[1] is wrong" ); Assert.AreEqual( "Subsidiary", e4.Values[2], "RelatedPartyRelationshipTypeItemType[2] is wrong" ); Assert.AreEqual( "Associate", e4.Values[3], "RelatedPartyRelationshipTypeItemType[3] is wrong" ); Assert.AreEqual( "JointVenture", e4.Values[4], "RelatedPartyRelationshipTypeItemType[4] is wrong" ); Assert.AreEqual( "KeyManagementPersonnel", e4.Values[5], "RelatedPartyRelationshipTypeItemType[5] is wrong" ); Assert.AreEqual( "OtherRelatedParty", e4.Values[6], "RelatedPartyRelationshipTypeItemType[6] is wrong" ); }