public void TestCollect() { int repeated = 2; MyContainer container = new MyContainer(repeated); Assert.AreEqual<int>(repeated,container.ArtifactLinks.Count); ArtifactLinkCollector target = new ArtifactLinkCollector(); target.Collect(container); Assert.AreEqual<int>(1, target.ArtifactLinks.Count); }
public void TestCollect() { int repeated = 2; MyContainer container = new MyContainer(repeated); Assert.AreEqual <int>(repeated, container.ArtifactLinks.Count); ArtifactLinkCollector target = new ArtifactLinkCollector(); target.Collect(container); Assert.AreEqual <int>(1, target.ArtifactLinks.Count); }
public static IArtifactLinkContainer GetArtifacts(ICollection <ModelElement> elements) { ArtifactLinkCollector collector = new ArtifactLinkCollector(); foreach (ModelElement element in elements) { if (typeof(IExtensibleObject).IsAssignableFrom(element.GetType())) { IArtifactLinkContainer links = GetArtifacts(element); collector.Collect(links); } } return(collector); }