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);
        }
示例#3
0
        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);
        }