コード例 #1
0
        public void UnknownAssemblyDoesNotThrow()
        {
            var project  = new XunitProject();
            var assembly = new XunitProjectAssembly();

            Assert.DoesNotThrow(() => project.RemoveAssembly(assembly));
        }
コード例 #2
0
ファイル: RunnerForm.cs プロジェクト: paynetechnologies/xunit
        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();
        }
コード例 #3
0
        public void RemovesAssemblyFromAssembliesList()
        {
            var project  = new XunitProject();
            var assembly = new XunitProjectAssembly();

            project.AddAssembly(assembly);

            project.RemoveAssembly(assembly);

            Assert.DoesNotContain(assembly, project.Assemblies);
        }
コード例 #4
0
        public void ProjectIsDirtyWhenRemovingAssembly()
        {
            var project  = new XunitProject();
            var assembly = new XunitProjectAssembly();

            project.AddAssembly(assembly);
            project.IsDirty = false;

            project.RemoveAssembly(assembly);

            Assert.True(project.IsDirty);
        }
コード例 #5
0
        public void NullAssemblyThrows()
        {
            var project = new XunitProject();

            Assert.Throws <ArgumentNullException>(() => project.RemoveAssembly(null));
        }