public void NullLoadInfo()
 {
     Assert.Throws<ArgumentNullException>(() =>
     {
         AssemblyTaskFactory taskFactory = new AssemblyTaskFactory();
         taskFactory.InitializeFactory(null, "TaskToTestFactories", new Dictionary<string, TaskPropertyInfo>(), string.Empty, null, false, null, ElementLocation.Create("NONE"), String.Empty);
     }
    );
 }
 public void NullTaskName()
 {
     Assert.Throws<InvalidProjectFileException>(() =>
     {
         AssemblyTaskFactory taskFactory = new AssemblyTaskFactory();
         taskFactory.InitializeFactory(_loadInfo, null, new Dictionary<string, TaskPropertyInfo>(), string.Empty, null, false, null, ElementLocation.Create("NONE"), String.Empty);
     }
    );
 }
 /// <summary>
 /// Abstract out the creation of the new AssemblyTaskFactory with default task, and 
 /// with some basic validation.
 /// </summary>
 private void SetupTaskFactory(IDictionary<string, string> factoryParameters, bool explicitlyLaunchTaskHost)
 {
     _taskFactory = new AssemblyTaskFactory();
     _loadInfo = AssemblyLoadInfo.Create(null, Assembly.GetAssembly(typeof(TaskToTestFactories)).Location);
     _loadedType = _taskFactory.InitializeFactory(_loadInfo, "TaskToTestFactories", new Dictionary<string, TaskPropertyInfo>(), string.Empty, factoryParameters, explicitlyLaunchTaskHost, null, ElementLocation.Create("NONE"), String.Empty);
     Assert.True(_loadedType.Assembly.Equals(_loadInfo)); // "Expected the AssemblyLoadInfo to be equal"
 }
 public void CallPublicInitializeFactory2()
 {
     Assert.Throws<InternalErrorException>(() =>
     {
         AssemblyTaskFactory taskFactory = new AssemblyTaskFactory();
         taskFactory.Initialize(String.Empty, null, new Dictionary<string, TaskPropertyInfo>(), String.Empty, null);
     }
    );
 }
 public void EmptyTaskName()
 {
     AssemblyTaskFactory taskFactory = new AssemblyTaskFactory();
     taskFactory.InitializeFactory(_loadInfo, String.Empty, new Dictionary<string, TaskPropertyInfo>(), string.Empty, null, false, null, ElementLocation.Create("NONE"), String.Empty);
 }
 public void TearDownAttribute()
 {
     _taskFactory = null;
     _loadInfo = null;
     _loadedType = null;
 }
 public void CallPublicInitializeFactory2()
 {
     AssemblyTaskFactory taskFactory = new AssemblyTaskFactory();
     taskFactory.Initialize(String.Empty, null, new Dictionary<string, TaskPropertyInfo>(), String.Empty, null);
 }