public void UnknownAssemblyDoesNotThrow() { var project = new XunitProject(); var assembly = new XunitProjectAssembly(); Assert.DoesNotThrow(() => project.RemoveAssembly(assembly)); }
void UnloadAssemblies(IEnumerable assemblyListViewItems) { foreach (ListViewItem assemblyListViewItem in assemblyListViewItems) { TestAssembly testAssembly = (TestAssembly)assemblyListViewItem.Tag; RemoveFileWatcher(testAssembly); listAssemblies.Items.Remove(assemblyListViewItem); mate.Unload(testAssembly); XunitProjectAssembly toRemove = null; foreach (XunitProjectAssembly assembly in project.Assemblies) { if (assembly.AssemblyFilename == testAssembly.AssemblyFilename && assembly.ConfigFilename == testAssembly.ConfigFilename) { toRemove = assembly; break; } } if (toRemove != null) { project.RemoveAssembly(toRemove); } } UpdateAssemblyFilter(); UpdateTestList(); UpdateTraitsList(); UpdateAssemblyDynamicMenus(); }
public void RemovesAssemblyFromAssembliesList() { var project = new XunitProject(); var assembly = new XunitProjectAssembly(); project.AddAssembly(assembly); project.RemoveAssembly(assembly); Assert.DoesNotContain(assembly, project.Assemblies); }
public void ProjectIsDirtyWhenRemovingAssembly() { var project = new XunitProject(); var assembly = new XunitProjectAssembly(); project.AddAssembly(assembly); project.IsDirty = false; project.RemoveAssembly(assembly); Assert.True(project.IsDirty); }
public void NullAssemblyThrows() { var project = new XunitProject(); Assert.Throws <ArgumentNullException>(() => project.RemoveAssembly(null)); }