public void TypeFullName_SearchAssemblySet_TypeFound() { var jobType = typeof(JobInExecutingAssembly).FullName; var anotherJobType = typeof(AnotherJobTask); var jobTypeSearchAssemblies = new List <Assembly> { Assembly.GetExecutingAssembly(), anotherJobType.Assembly }; var jobTypeResolver = new JobTypeResolver(jobTypeSearchAssemblies); var result = jobTypeResolver.ResolveType(jobType); Assert.IsNotNull(result); Assert.AreEqual(typeof(JobInExecutingAssembly), result); result = jobTypeResolver.ResolveType(anotherJobType.FullName); Assert.IsNotNull(result); Assert.AreEqual(anotherJobType, result); }
public void AssemblyFullqualifiedName_NoSearchAssemblySet_TypeFound() { var jobType = typeof(JobInExecutingAssembly).AssemblyQualifiedName; var jobTypeResolver = new JobTypeResolver(null); var result = jobTypeResolver.ResolveType(jobType); Assert.IsNotNull(result); Assert.AreEqual(typeof(JobInExecutingAssembly), result); }
public void TypeFullName_SearchAssemblySet_TypeFound() { var jobTypeSearchAssembly = Assembly.GetExecutingAssembly(); var jobType = typeof(JobInExecutingAssembly).FullName; var jobTypeResolver = new JobTypeResolver(jobTypeSearchAssembly); var result = jobTypeResolver.ResolveType(jobType); Assert.IsNotNull(result); Assert.AreEqual(typeof(JobInExecutingAssembly), result); }