NUnit.Framework.Assert.IsFalse(bool)

Here are the examples of the csharp api class NUnit.Framework.Assert.IsFalse(bool) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

200 Examples 7

151. Example

Project: ContinuousTests
Source File: NUnitProjectTests.cs
[Test]
		public void LoadMakesProjectNotDirty()
		{
			project.Save( xmlfile );
			NUnitProject project2 = new ProjectService().LoadProject( xmlfile );
			Assert.IsFalse( project2.IsDirty );
		}

152. Example

Project: ContinuousTests
Source File: PathUtilTests.cs
public static void NotSamePath( string path1, string path2 )
		{
			string msg = "\r\n\texpected: Not same path as <{0}>\r\n\t but was: <{1}>";
			Assert.IsFalse( PathUtils.SamePath( path1, path2 ), msg, path1, path2 );
		}

153. Example

Project: ContinuousTests
Source File: PathUtilTests.cs
public static void NotSamePathOrUnder( string path1, string path2 )
		{
			string msg = "\r\n\texpected: Not same path or under <{0}>\r\n\t but was: <{1}>";
			Assert.IsFalse( PathUtils.SamePathOrUnder( path1, path2 ), msg, path1, path2 );
		}

154. Example

Project: ContinuousTests
Source File: ProjectConfigTests.cs
[Test]
        public void AddingSubsequentConfigDoesNotRequireReload()
        {
            project.Configs.Add("New");
            Assert.IsFalse(project.HasChangesRequiringReload);
        }

155. Example

Project: ContinuousTests
Source File: ProjectConfigTests.cs
[Test]
        public void RenameInactiveConfigDoesNotRequireReload()
        {
            inactiveConfig.Name = "Renamed";
            Assert.IsFalse(project.HasChangesRequiringReload);
        }

156. Example

Project: ContinuousTests
Source File: ProjectConfigTests.cs
[Test]
        public void SettingInactiveConfigConfigurationFileDoesNotRequireReload()
        {
            inactiveConfig.ConfigurationFile = "MyProject.config";
            Assert.IsFalse(project.HasChangesRequiringReload);
        }

157. Example

Project: ContinuousTests
Source File: ProjectConfigTests.cs
[Test]
        public void SettingInactiveConfigBinPathTypeDoesNotRequireReload()
        {
            inactiveConfig.BinPathType = BinPathType.Manual;
            Assert.IsFalse(project.HasChangesRequiringReload);
        }

158. Example

Project: ContinuousTests
Source File: TestDomainFixture.cs
[Test]
		public void InvalidTestFixture()
		{
			TestPackage package = new TestPackage(mockDll);
			package.TestName = "NUnit.Tests.Assemblies.Bogus";
			Assert.IsFalse( testDomain.Load( package ) );
		}

159. Example

Project: ContinuousTests
Source File: TestDomainFixture.cs
[Test, Platform(Exclude="mono-1.0", Reason="Test hangs under the 1.0 profile")]
		public void TurnOffShadowCopy()
		{
			TestPackage package = new TestPackage(mockDll);
			package.Settings["ShadowCopyFiles"] = false;
			testDomain.Load( package );
			Assert.IsFalse( testDomain.AppDomain.ShadowCopyFiles );
					
			// Prove that shadow copy is really off
//			string location = "NOT_FOUND";
//			foreach( Assembly assembly in testDomain.AppDomain.GetAssemblies() )
//			{
//				if ( assembly.FullName.StartsWith( "mock-assembly" ) )
//				{
//					location = Path.GetDirectoryName( assembly.Location );
//					break;
//				}
//			}
//		
//			StringAssert.StartsWith( AppDomain.CurrentDomain.BaseDirectory.ToLower(), location.ToLower() );
		}

160. Example

Project: ContinuousTests
Source File: VSProjectTests.cs
[Test]
		public void NotWebProject()
		{
			Assert.IsFalse(VSProject.IsProjectFile( @"http://localhost/web.csproj") );
			Assert.IsFalse(VSProject.IsProjectFile( @"\MyProject\http://localhost/web.csproj") );
		}

161. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test]
		public void InvalidOption()
		{
			ConsoleOptions options = new ConsoleOptions( "-asembly:nunit.tests.dll" );
			Assert.IsFalse(options.Validate());
		}

162. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test]
		public void NoFixtureNameProvided()
		{
			ConsoleOptions options = new ConsoleOptions( "-fixture:", "nunit.tests.dll" );
			Assert.IsFalse(options.Validate());
		}

163. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test] 
		public void InvalidCommandLineParms()
		{
			ConsoleOptions options = new ConsoleOptions( "-garbage:TestFixture", "-assembly:Tests.dll" );
			Assert.IsFalse(options.Validate());
		}

164. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test]
		public void XmlParameterWithoutFileNameIsInvalid()
		{
			ConsoleOptions options = new ConsoleOptions( "tests.dll", "-xml:" );
			Assert.IsFalse(options.Validate());			
		}

165. Example

Project: ContinuousTests
Source File: RecentFileMenuHandlerTests.cs
[Test]
		public void DisableOnLoadWhenEmpty()
		{
			handler.Load();
			Assert.IsFalse( menu.Enabled );
		}

166. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test]
		public void InvalidArgs()
		{
			GuiOptions options = new GuiOptions(new string[] { "-asembly:nunit.tests.dll" });
			Assert.IsFalse(options.Validate());
		}

167. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test] 
		public void InvalidCommandLineParms()
		{
			GuiOptions parser = new GuiOptions(new String[]{"-garbage:TestFixture", "-assembly:Tests.dll"});
			Assert.IsFalse(parser.Validate());
		}

168. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test] 
		public void NoNameValuePairs()
		{
			GuiOptions parser = new GuiOptions(new String[]{"TestFixture", "Tests.dll"});
			Assert.IsFalse(parser.Validate());
		}

169. Example

Project: ContinuousTests
Source File: AssemblyReaderTests.cs
[Test]
		public void IsValidPeFile_Fails()
		{
			string configFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
			Assert.IsFalse( new AssemblyReader( configFile ).IsValidPeFile );
		}

170. Example

Project: ContinuousTests
Source File: ExpectExceptionTest.cs
[Test]
		public void ExceptionHandlerIsNotCalledWhenExceptionDoesNotMatch()
		{
			ExceptionHandlerCalledClass fixture = new ExceptionHandlerCalledClass();
			Test test = TestBuilder.MakeTestCase( fixture, "ThrowsApplicationException" );
            test.Run(NullListener.NULL, TestFilter.Empty);
			Assert.IsFalse( fixture.HandlerCalled, "Base Handler should not be called" );
			Assert.IsFalse( fixture.AlternateHandlerCalled, "Alternate Handler should not be called" );
		}

171. Example

Project: ContinuousTests
Source File: ExpectExceptionTest.cs
[Test]
		public void ExceptionHandlerIsNotCalledWhenExceptionDoesNotMatch_AlternateHandler()
		{
			ExceptionHandlerCalledClass fixture = new ExceptionHandlerCalledClass();
			Test test = TestBuilder.MakeTestCase( fixture, "ThrowsApplicationException_AlternateHandler" );
            test.Run(NullListener.NULL, TestFilter.Empty);
			Assert.IsFalse(fixture.HandlerCalled, "Base Handler should not be called");
			Assert.IsFalse(fixture.AlternateHandlerCalled, "Alternate Handler should not be called");
		}

172. Example

Project: ContinuousTests
Source File: FixtureSetUpTearDownTest.cs
[Test]
		public void IgnoredFixtureShouldNotCallFixtureSetUpOrTearDown()
		{
			IgnoredFixture fixture = new IgnoredFixture();
			TestSuite suite = new TestSuite("IgnoredFixtureSuite");
			TestSuite fixtureSuite = TestBuilder.MakeFixture( fixture.GetType() );
			suite.Fixture = fixture;
			Test test = (Test)fixtureSuite.Tests[0];
			suite.Add( fixtureSuite );

            fixtureSuite.Run(NullListener.NULL, TestFilter.Empty);
			Assert.IsFalse( fixture.setupCalled, "TestFixtureSetUp called running fixture" );
			Assert.IsFalse( fixture.teardownCalled, "TestFixtureTearDown called running fixture" );

            suite.Run(NullListener.NULL, TestFilter.Empty);
			Assert.IsFalse( fixture.setupCalled, "TestFixtureSetUp called running enclosing suite" );
			Assert.IsFalse( fixture.teardownCalled, "TestFixtureTearDown called running enclosing suite" );

            test.Run(NullListener.NULL, TestFilter.Empty);
			Assert.IsFalse( fixture.setupCalled, "TestFixtureSetUp called running a test case" );
			Assert.IsFalse( fixture.teardownCalled, "TestFixtureTearDown called running a test case" );
		}

173. Example

Project: ContinuousTests
Source File: IgnoreFixture.cs
[Test]
		public void IgnoreWorksForTestSuite()
		{
			//IgnoredTestSuiteFixture testFixture = new IgnoredTestSuiteFixture();
			TestSuite suite = new TestSuite("IgnoredTestFixture");
			suite.Add( TestBuilder.MakeFixture( typeof( IgnoredTestSuiteFixture ) ) );
            TestResult result = suite.Run(NullListener.NULL, TestFilter.Empty);

			TestResult fixtureResult = (TestResult)result.Results[0];
			Assert.IsFalse( fixtureResult.Executed, "Fixture should not have been executed" );
			
			foreach( TestResult testResult in fixtureResult.Results )
				Assert.IsFalse( testResult.Executed, "Test case should not have been executed" );
		}

174. Example

Project: ContinuousTests
Source File: TestSuiteTest.cs
[Test]
		public void RunSingleTest()
		{
			TestSuite fixture = TestBuilder.MakeFixture( typeof( NUnit.Tests.Assemblies.MockTestFixture ) );
			Test test = (Test) fixture.Tests[0];
			RecordingListener listener = new RecordingListener();
			test.Run(listener, null);
			Assert.IsFalse(listener.lastResult.IsFailure);
		}

175. Example

Project: ContinuousTests
Source File: AfterConstraintTests.cs
[Test,TestCaseSource("FailureDelegates")]
        public void FailsWithBadDelegates(ActualValueDelegate del)
        {
            Assert.IsFalse(theConstraint.Matches(del));
        }

176. Example

Project: ContinuousTests
Source File: ConditionAssertTests.cs
[Test]
		public void IsFalse()
		{
			Assert.IsFalse(false);
		}

177. Example

Project: ContinuousTests
Source File: ConditionAssertTests.cs
[Test]
		[ExpectedException(typeof(AssertionException))]
		public void IsFalseFails()
		{
			expectedMessage =
				"  Expected: False" + Environment.NewLine +
				"  But was:  True" + Environment.NewLine;
			Assert.IsFalse(true);
		}

178. Example

Project: ContinuousTests
Source File: MockTests.cs
[Test]
		public void StrictDefaultsToFalse()
		{
			Assert.IsFalse( mock.Strict );
		}

179. Example

Project: ContinuousTests
Source File: RepeatedTestFixtureTests.cs
[Test, Repeat(3)]
		public void RepeatFailOnFirst()
		{
			count++;
			Assert.IsFalse (true);
		}

180. Example

Project: ContinuousTests
Source File: NUnitProjectLoad.cs
[Test]
		public void SaveClearsAssemblyWrapper()
		{
			NUnitProject project = projectService.WrapAssembly(mockDll);
			project.Save( xmlfile );
			Assert.IsFalse( project.IsAssemblyWrapper,
				"Changed project should no longer be wrapper");
		}

181. Example

Project: ContinuousTests
Source File: NUnitProjectTests.cs
[Test]
		public void NewProjectIsNotDirty()
		{
			Assert.IsFalse( project.IsDirty );
		}

182. Example

Project: ContinuousTests
Source File: NUnitProjectTests.cs
[Test]
		public void NewProjectNotLoadable()
		{
			Assert.IsFalse( project.IsLoadable );
		}

183. Example

Project: ContinuousTests
Source File: NUnitProjectTests.cs
[Test]
		public void SaveMakesProjectNotDirty()
		{
			project.Save( xmlfile );
			Assert.IsFalse( project.IsDirty );
		}

184. Example

Project: ContinuousTests
Source File: NUnitProjectTests.cs
[Test]
		public void LoadMakesProjectNotDirty()
		{
			project.Save( xmlfile );
			NUnitProject project2 = new ProjectService().LoadProject( xmlfile );
			Assert.IsFalse( project2.IsDirty );
		}

185. Example

Project: ContinuousTests
Source File: PathUtilTests.cs
public static void NotSamePath( string path1, string path2 )
		{
			string msg = "\r\n\texpected: Not same path as <{0}>\r\n\t but was: <{1}>";
			Assert.IsFalse( PathUtils.SamePath( path1, path2 ), msg, path1, path2 );
		}

186. Example

Project: ContinuousTests
Source File: PathUtilTests.cs
public static void NotSamePathOrUnder( string path1, string path2 )
		{
			string msg = "\r\n\texpected: Not same path or under <{0}>\r\n\t but was: <{1}>";
			Assert.IsFalse( PathUtils.SamePathOrUnder( path1, path2 ), msg, path1, path2 );
		}

187. Example

Project: ContinuousTests
Source File: ProjectConfigTests.cs
[Test]
        public void AddingSubsequentConfigDoesNotRequireReload()
        {
            project.Configs.Add("New");
            Assert.IsFalse(project.HasChangesRequiringReload);
        }

188. Example

Project: ContinuousTests
Source File: ProjectConfigTests.cs
[Test]
        public void RenameInactiveConfigDoesNotRequireReload()
        {
            inactiveConfig.Name = "Renamed";
            Assert.IsFalse(project.HasChangesRequiringReload);
        }

189. Example

Project: ContinuousTests
Source File: ProjectConfigTests.cs
[Test]
        public void SettingInactiveConfigConfigurationFileDoesNotRequireReload()
        {
            inactiveConfig.ConfigurationFile = "MyProject.config";
            Assert.IsFalse(project.HasChangesRequiringReload);
        }

190. Example

Project: ContinuousTests
Source File: ProjectConfigTests.cs
[Test]
        public void SettingInactiveConfigBinPathTypeDoesNotRequireReload()
        {
            inactiveConfig.BinPathType = BinPathType.Manual;
            Assert.IsFalse(project.HasChangesRequiringReload);
        }

191. Example

Project: ContinuousTests
Source File: TestDomainFixture.cs
[Test]
		public void InvalidTestFixture()
		{
			TestPackage package = new TestPackage(mockDll);
			package.TestName = "NUnit.Tests.Assemblies.Bogus";
			Assert.IsFalse( testDomain.Load( package ) );
		}

192. Example

Project: ContinuousTests
Source File: TestDomainFixture.cs
[Test, Platform(Exclude="mono-1.0", Reason="Test hangs under the 1.0 profile")]
		public void TurnOffShadowCopy()
		{
			TestPackage package = new TestPackage(mockDll);
			package.Settings["ShadowCopyFiles"] = false;
			testDomain.Load( package );
			Assert.IsFalse( testDomain.AppDomain.ShadowCopyFiles );
					
			// Prove that shadow copy is really off
//			string location = "NOT_FOUND";
//			foreach( Assembly assembly in testDomain.AppDomain.GetAssemblies() )
//			{
//				if ( assembly.FullName.StartsWith( "mock-assembly" ) )
//				{
//					location = Path.GetDirectoryName( assembly.Location );
//					break;
//				}
//			}
//		
//			StringAssert.StartsWith( AppDomain.CurrentDomain.BaseDirectory.ToLower(), location.ToLower() );
		}

193. Example

Project: ContinuousTests
Source File: VSProjectTests.cs
[Test]
		public void NotWebProject()
		{
			Assert.IsFalse(VSProject.IsProjectFile( @"http://localhost/web.csproj") );
			Assert.IsFalse(VSProject.IsProjectFile( @"\MyProject\http://localhost/web.csproj") );
		}

194. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test]
		public void InvalidOption()
		{
			ConsoleOptions options = new ConsoleOptions( "-asembly:nunit.tests.dll" );
			Assert.IsFalse(options.Validate());
		}

195. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test]
		public void NoFixtureNameProvided()
		{
			ConsoleOptions options = new ConsoleOptions( "-fixture:", "nunit.tests.dll" );
			Assert.IsFalse(options.Validate());
		}

196. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test] 
		public void InvalidCommandLineParms()
		{
			ConsoleOptions options = new ConsoleOptions( "-garbage:TestFixture", "-assembly:Tests.dll" );
			Assert.IsFalse(options.Validate());
		}

197. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test]
		public void XmlParameterWithoutFileNameIsInvalid()
		{
			ConsoleOptions options = new ConsoleOptions( "tests.dll", "-xml:" );
			Assert.IsFalse(options.Validate());			
		}

198. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test]
		public void InvalidArgs()
		{
			GuiOptions options = new GuiOptions(new string[] { "-asembly:nunit.tests.dll" });
			Assert.IsFalse(options.Validate());
		}

199. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test] 
		public void InvalidCommandLineParms()
		{
			GuiOptions parser = new GuiOptions(new String[]{"-garbage:TestFixture", "-assembly:Tests.dll"});
			Assert.IsFalse(parser.Validate());
		}

200. Example

Project: ContinuousTests
Source File: CommandLineTests.cs
[Test] 
		public void NoNameValuePairs()
		{
			GuiOptions parser = new GuiOptions(new String[]{"TestFixture", "Tests.dll"});
			Assert.IsFalse(parser.Validate());
		}