示例#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);
            }
        }
示例#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);
        }
示例#3
0
 public void DiscoverThrowsWithNullInput()
 {
     IStageDiscovery discovery = new StageDiscovery(s_log);
     discovery.Discover(null);
 }
示例#4
0
 public void DiscoverThrowsWithEmptyInput()
 {
     IStageDiscovery discovery = new StageDiscovery(s_log);
     discovery.Discover(String.Empty);
 }
示例#5
0
        public void ResolvesCorrectNumberOfTypes()
        {
            IStageDiscovery discovery = new StageDiscovery(s_log);
            discovery.Discover(s_validAssembliesToProbe.First());

            Assert.AreEqual(1, discovery.StageTypes.Count);
        }
示例#6
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);
        }
示例#7
0
        public void GetNullTypeFromImportedAssembly()
        {
            IStageDiscovery discovery = new StageDiscovery(s_log);

            discovery.Discover(s_validAssembliesToProbe.First());

            Type actual = discovery.GetType(null);
        }