private static IBdt ShouldContainBdt(IBdtLibrary bdtLibrary, string name, string cdtName, string[] generatedSups) { IBdt bdt = bdtLibrary.GetBdtByName(name); Assert.IsNotNull(bdt, "BDT '" + name + "' not generated"); Assert.That(bdt.BasedOn, Is.Not.Null, "BasedOn reference not specified"); Assert.AreEqual(cdtName, bdt.BasedOn.Name, "BasedOn wrong CDT"); if (generatedSups == null || generatedSups.Length == 0) { Assert.That(SupNames(bdt), Is.Empty); } else { Assert.That(SupNames(bdt), Is.EquivalentTo(generatedSups)); } return(bdt); }
/// <summary> /// Retrieves the BDT based on the given CDT from the BDT library. If the BDT does not yet exist, it is created. /// </summary> /// <param name="bccMapping"></param> /// <returns></returns> private IBdt GetBdt(AttributeOrSimpleElementOrComplexElementToBccMapping bccMapping) { IMapping bccTypeMapping = bccMapping.BccTypeMapping; return(bdtLibrary.GetBdtByName(bccTypeMapping.BIEName)); }