public void IsValidReturnsFalseForClassWithoutAnyAttributes()
		{
			MockClass c = MockClass.CreateMockClassWithoutAnyAttributes();
			IProject project = c.MockProjectContent.ProjectAsIProject;
			ClassNode classNode = new ClassNode(project, c);
			Assert.IsFalse(testableCondition.IsValid(classNode, null));
		}
		public void TestClassPassedToRegisteredTestFrameworksIsTestClass()
		{
			MockClass c = MockClass.CreateMockClassWithoutAnyAttributes();
			IProject project = c.MockProjectContent.ProjectAsIProject;
			ClassNode classNode = new ClassNode(project, c);
			testableCondition.IsValid(classNode, null);
			Assert.AreEqual(c, testFrameworks.IsTestClassParameterUsed);
		}
		public void Init()
		{
			MockAttribute testAttribute = new MockAttribute("Test");
			classWithTestAttribute = MockClass.CreateMockClassWithAttribute(testAttribute);
			IProject project = classWithTestAttribute.MockProjectContent.ProjectAsIProject;
			classNodeForClassWithTestAttribute = new ClassNode(project, classWithTestAttribute);
			
			testFrameworks = new MockRegisteredTestFrameworks();
			testFrameworks.AddTestClass(classWithTestAttribute);
			
			testableCondition = new TestableCondition(testFrameworks);
		}
		public void IsValidWhenClassHasTestFixtureAttribute()
		{
			IProject project = new MockCSharpProject();
			MockClass mockClass = new MockClass();
			mockClass.Attributes.Add(new MockAttribute("TestFixture"));
			MockProjectContent mockProjectContent = new MockProjectContent();
			mockProjectContent.Project = project;
			mockProjectContent.Language = LanguageProperties.None;
			mockClass.ProjectContent = mockProjectContent;
			ClassNode classNode = new ClassNode(project, mockClass);

			TestableCondition testableCondition = new TestableCondition();
			Assert.IsTrue(testableCondition.IsValid(classNode, null));
		}
		public void IsValidWhenNameComparerIsNull()
		{
			IProject project = new MockCSharpProject();
			MockClass mockClass = new MockClass();
			MockProjectContent mockProjectContent = new MockProjectContent();
			mockProjectContent.Project = project;
			mockProjectContent.Language = new LanguageProperties(null);
			mockClass.ProjectContent = mockProjectContent;
			ClassNode classNode = new ClassNode(project, mockClass);

			TestableCondition testableCondition = new TestableCondition();
			Assert.IsFalse(testableCondition.IsValid(classNode, null));
		}
		public void IsValidWhenLanguageIsNull()
		{
			MSBuildBasedProject project = new MockCSharpProject();
			MockClass mockClass = new MockClass();
			MockProjectContent mockProjectContent = new MockProjectContent();
			mockProjectContent.Project = project;
			mockClass.ProjectContent = mockProjectContent;
			ClassNode classNode = new ClassNode(project, mockClass);

			TestableCondition testableCondition = new TestableCondition();
			Assert.IsFalse(testableCondition.IsValid(classNode, null));
		}
		public void IsValidWhenProjectIsNull()
		{
			MockClass mockClass = new MockClass();
			MockProjectContent mockProjectContent = new MockProjectContent();
			mockClass.ProjectContent = mockProjectContent;
			ClassNode classNode = new ClassNode(null, mockClass);
			
			TestableCondition testableCondition = new TestableCondition();
			Assert.IsFalse(testableCondition.IsValid(classNode, null));
		}
		public void GetProjectWhenProjectContentIsNull()
		{
			MockClass mockClass = new MockClass();
			ClassNode classNode = new ClassNode(null, mockClass);
			
			Assert.IsNull(TestableCondition.GetProject(classNode));
		}
		public void GetProjectFromClassNode()
		{
			MSBuildBasedProject project = new MockCSharpProject();
			MockClass mockClass = new MockClass();
			MockProjectContent mockProjectContent = new MockProjectContent();
			mockProjectContent.Project = project;
			mockClass.ProjectContent = mockProjectContent;
			ClassNode classNode = new ClassNode(project, mockClass);
				
			Assert.IsTrue(Object.ReferenceEquals(project, TestableCondition.GetProject(classNode)));
		}
		public void GetClassFromClassNode()
		{
			MockClass mockClass = new MockClass();
			ClassNode classNode = new ClassNode(null, mockClass);
			
			Assert.IsTrue(Object.ReferenceEquals(mockClass, TestableCondition.GetClass(classNode)));
		}
		public TreeNode AddClassNode(ExtTreeView classBrowser, IProject project, IClass c)
		{
			ClassNode cNode = new ClassNode(project, c);
			cNode.AddTo(classBrowser);
			return cNode;
		}