public void ShouldUseTypeNameIfNoNameSpecified()
        {
            ModuleInfoGroup groupInfo = new ModuleInfoGroup();
            groupInfo.AddModule(typeof(MockModule));

            Assert.AreEqual<int>(1, groupInfo.Count);
            Assert.AreEqual<string>(typeof(MockModule).Name, groupInfo.ElementAt(0).ModuleName);
        }
 public void NullTypeThrows()
 {
     var ex = Assert.Throws <ArgumentNullException>(() =>
     {
         ModuleInfoGroup groupInfo = new ModuleInfoGroup();
         groupInfo.AddModule("NullModule", null);
     });
 }
        public void ShouldSetModuleTypeCorrectly()
        {
            ModuleInfoGroup groupInfo = new ModuleInfoGroup();
            groupInfo.AddModule("MockModule", typeof(MockModule));

            Assert.AreEqual<int>(1, groupInfo.Count);
            Assert.AreEqual<string>(typeof(MockModule).AssemblyQualifiedName, groupInfo.ElementAt(0).ModuleType);
        }
        public void ShouldUseTypeNameIfNoNameSpecified()
        {
            ModuleInfoGroup groupInfo = new ModuleInfoGroup();

            groupInfo.AddModule(typeof(MockModule));

            Assert.AreEqual <int>(1, groupInfo.Count);
            Assert.AreEqual <string>(typeof(MockModule).Name, groupInfo.ElementAt(0).ModuleName);
        }
        public void ShouldSetModuleTypeCorrectly()
        {
            ModuleInfoGroup groupInfo = new ModuleInfoGroup();

            groupInfo.AddModule("MockModule", typeof(MockModule));

            Assert.AreEqual <int>(1, groupInfo.Count);
            Assert.AreEqual <string>(typeof(MockModule).AssemblyQualifiedName, groupInfo.ElementAt(0).ModuleType);
        }
        public void ShouldUseTypeNameIfNoNameSpecified()
        {
            ModuleInfoGroup groupInfo = new ModuleInfoGroup();

            groupInfo.AddModule(typeof(MockModule));

            Assert.Single(groupInfo);
            Assert.Equal(typeof(MockModule).Name, groupInfo.ElementAt(0).ModuleName);
        }
        public void ShouldSetModuleTypeCorrectly()
        {
            ModuleInfoGroup groupInfo = new ModuleInfoGroup();

            groupInfo.AddModule("MockModule", typeof(MockModule));

            Assert.Single(groupInfo);
            Assert.Equal(typeof(MockModule).AssemblyQualifiedName, groupInfo.ElementAt(0).ModuleType);
        }
        public void ShouldAddModuleToModuleInfoGroup()
        {
            string moduleName = "MockModule";
            ModuleInfoGroup groupInfo = new ModuleInfoGroup();
            groupInfo.AddModule(moduleName, typeof(MockModule));

            Assert.AreEqual<int>(1, groupInfo.Count);
            Assert.AreEqual<string>(moduleName, groupInfo.ElementAt(0).ModuleName);
        }
        public void ShouldAddModuleToModuleInfoGroup()
        {
            string          moduleName = "MockModule";
            ModuleInfoGroup groupInfo  = new ModuleInfoGroup();

            groupInfo.AddModule(moduleName, typeof(MockModule));

            Assert.AreEqual <int>(1, groupInfo.Count);
            Assert.AreEqual <string>(moduleName, groupInfo.ElementAt(0).ModuleName);
        }
        public void ShouldAddModuleToModuleInfoGroup()
        {
            string          moduleName = "MockModule";
            ModuleInfoGroup groupInfo  = new ModuleInfoGroup();

            groupInfo.AddModule(moduleName, typeof(MockModule));

            Assert.Single(groupInfo);
            Assert.Equal(moduleName, groupInfo.ElementAt(0).ModuleName);
        }
        public void ShouldSetDependencies()
        {
            string dependency1 = "ModuleA";
            string dependency2 = "ModuleB";

            ModuleInfoGroup groupInfo = new ModuleInfoGroup();
            groupInfo.AddModule("MockModule", typeof(MockModule), dependency1, dependency2);

            Assert.IsNotNull(groupInfo.ElementAt(0).DependsOn);
            Assert.AreEqual(2, groupInfo.ElementAt(0).DependsOn.Count);
            Assert.IsTrue(groupInfo.ElementAt(0).DependsOn.Contains(dependency1));
            Assert.IsTrue(groupInfo.ElementAt(0).DependsOn.Contains(dependency2));
        }
        public void ShouldSetDependencies()
        {
            string dependency1 = "ModuleA";
            string dependency2 = "ModuleB";

            ModuleInfoGroup groupInfo = new ModuleInfoGroup();

            groupInfo.AddModule("MockModule", typeof(MockModule), dependency1, dependency2);

            Assert.IsNotNull(groupInfo.ElementAt(0).DependsOn);
            Assert.AreEqual(2, groupInfo.ElementAt(0).DependsOn.Count);
            Assert.IsTrue(groupInfo.ElementAt(0).DependsOn.Contains(dependency1));
            Assert.IsTrue(groupInfo.ElementAt(0).DependsOn.Contains(dependency2));
        }
        public void NullTypeThrows()
        {
            ModuleInfoGroup groupInfo = new ModuleInfoGroup();

            groupInfo.AddModule("NullModule", null);
        }
 public void NullTypeThrows()
 {
     ModuleInfoGroup groupInfo = new ModuleInfoGroup();
     groupInfo.AddModule("NullModule", null);
 }
 public void NullTypeThrows()
 {
     ModuleInfoGroup groupInfo = new ModuleInfoGroup();
     Assert.ThrowsException<ArgumentNullException>(() => groupInfo.AddModule("NullModule", null));
 }