/// <summary> /// Saves an animal delegation authority with a new hyperlink /// </summary> /// <param name="authority">the authority to save</param> /// <param name="hyperlink">the new hyperlink</param> protected void SaveWithNewHyperlink(BOAnimalDelegationAuthority authority, string hyperlink) { authority.HyperlinkRTARoadmap = hyperlink; authority.Save(); authority = LoadAnimalDelegationAuthority(); Assert.IsTrue(authority.HyperlinkRTARoadmap == hyperlink); }
/// <summary> /// Adds an animal delegation authority to a species. /// </summary> /// <param name="taxon">the species to receive the new authority</param> /// <param name="availableCode">a string containing two ids in the form "ddd,aaa" where ddd is /// the delegation code and aaa is the application type id</param> /// <returns>the animal delegation authority</returns> protected BOAnimalDelegationAuthority AddAnimalDelegationAuthority(BOTaxon taxon, string availableCode) { BOAnimalDelegationAuthority authority = new BOAnimalDelegationAuthority(); string[] parts = availableCode.Split(",".ToCharArray()); authority.DelegationCode = Int32.Parse(parts[0]); authority.ApplicationTypeID = Int32.Parse(parts[1]); authority.SpeciesKingdomID = taxon.KingdomID; authority.SpeciesTaxonomyID = taxon.TaxonId; authority.SpeciesTaxonTypeID = taxon.TaxonTypeID; authority.HyperlinkRTARoadmap = "www.unittest.com"; return((BOAnimalDelegationAuthority)authority.Save()); }