public void BuildsContentsSuccessfully(MessageType type, string[] names, ComponentStatus status, Func <string, string> getExpected)
            {
                var root      = new NuGetServiceComponentFactory().Create();
                var component = root.GetByNames(names);
                var result    = Invoke(type, component, status);

                Assert.Equal(
                    getExpected(GetStatus(component, status).ToString().ToLowerInvariant()),
                    result);
            }
        public void BuildsContentSuccessfullyTestsAllVisibleComponents()
        {
            var root       = new NuGetServiceComponentFactory().Create();
            var components = new BuildsContentsSuccessfully_Data().Data
                             .Select(t => root.GetByNames(t.Item2));

            foreach (var component in root.GetAllVisibleComponents())
            {
                if (root == component)
                {
                    continue;
                }

                if (!components.Any(c => c == component))
                {
                    throw new KeyNotFoundException(component.Path);
                }
            }
        }
Exemple #3
0
 public NuGetServiceComponentFactoryTest()
 {
     Factory = new NuGetServiceComponentFactory();
 }