Exemple #1
0
        public void DoesNotResolveInvalidStageAssemblies()
        {
            IStageDiscovery discovery = new StageDiscovery(s_log);

            foreach (string assm in s_invalidAssembliesToProbe)
            {
                discovery.Discover(assm);
                Assert.AreEqual(0, discovery.StageTypes.Count);
            }
        }
Exemple #2
0
        public void GetInvalidTypeFromImportedAssembly()
        {
            IStageDiscovery discovery = new StageDiscovery(s_log);

            discovery.Discover(s_validAssembliesToProbe.First());

            Type actual = discovery.GetType("SampleStageLibrary.SomeRandomType");
            Assert.IsNull(actual);
        }
Exemple #3
0
 public void DiscoverThrowsWithNullInput()
 {
     IStageDiscovery discovery = new StageDiscovery(s_log);
     discovery.Discover(null);
 }
Exemple #4
0
 public void DiscoverThrowsWithEmptyInput()
 {
     IStageDiscovery discovery = new StageDiscovery(s_log);
     discovery.Discover(String.Empty);
 }
Exemple #5
0
 public void DiscoverCtorWithNullInput()
 {
     IStageDiscovery discovery = new StageDiscovery(null);
 }
Exemple #6
0
        public void ResolvesCorrectNumberOfTypes()
        {
            IStageDiscovery discovery = new StageDiscovery(s_log);
            discovery.Discover(s_validAssembliesToProbe.First());

            Assert.AreEqual(1, discovery.StageTypes.Count);
        }
Exemple #7
0
        public void GetValidTypeFromImportedAssembly()
        {
            IStageDiscovery discovery = new StageDiscovery(s_log);

            discovery.Discover(s_validAssembliesToProbe.First());

            Type actual = discovery.GetType("SampleStageLibrary.SampleStage1");
            Assert.AreEqual<Type>(typeof(SampleStageLibrary.SampleStage1), actual);
        }
Exemple #8
0
        public void GetNullTypeFromImportedAssembly()
        {
            IStageDiscovery discovery = new StageDiscovery(s_log);

            discovery.Discover(s_validAssembliesToProbe.First());

            Type actual = discovery.GetType(null);
        }