NUnit.Framework.Assert.IsFalse(bool, string, params object[])

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

13 Examples 7

1. Example

Project: 32feet
Source File: Assert.cs
View license
static public void IsFalse(bool condition, string message) 
		{
			Assert.IsFalse( condition, message, null );
		}

2. Example

Project: 32feet
Source File: Assert.cs
View license
static public void IsFalse(bool condition, string message) 
		{
			Assert.IsFalse( condition, message, null );
		}

3. Example

Project: 32feet
Source File: Assert.cs
View license
static public void IsFalse(bool condition) 
		{
			Assert.IsFalse(condition, string.Empty, null);
		}

4. Example

Project: 32feet
Source File: Assert.cs
View license
static public void IsFalse(bool condition) 
		{
			Assert.IsFalse(condition, string.Empty, null);
		}

5. Example

Project: EmailValidation
Source File: Test.cs
View license
[Test]
		public void TestValidationAttributeInvalidAddresses ()
		{
			EmailValidationTarget target = new EmailValidationTarget ();

			foreach (var email in InvalidAddresses) {
				target.Email = email;

				Assert.IsFalse (AreAttributesValid (target), "Invalid Address {0}", email);
			}
		}

6. Example

Project: nant
Source File: LinkTaskTest.cs
View license
void CleanAllObjs() {
            foreach (string objPathName in _objPathName) {
                try {
                    File.Delete(objPathName);
                } catch (Exception) {
                } finally {
                    Assert.IsFalse(File.Exists(objPathName), "Object file \"{0}\" exists.", objPathName);
                }
            }
        }

7. Example

Project: nant
Source File: LinkTaskTest.cs
View license
void CleanAllBins() {
            try {
                File.Delete(_binPathName);
            } catch (Exception) {
            } finally {
                Assert.IsFalse(File.Exists(_binPathName), "Binary file \"{0}\" exists.", _binPathName);
            }
        }

8. Example

Project: nant
Source File: ClTaskTest.cs
View license
void CleanAllObjs() {
            foreach (string objPathName in _objPathName) {
                try {
                    File.Delete(objPathName);
                } catch (Exception) {
                } finally { 
                    Assert.IsFalse(File.Exists(objPathName), "Object file \"{0}\" exists.", objPathName);
                }
            }
        }

9. Example

View license
[Test]
		public void GenerateAliasForGenericTypeName()
		{
			const string typeName = "A`1[B]";
			string alias = StringHelper.GenerateAlias(typeName, 10);

			Assert.IsFalse(alias.Contains("`"), "alias '{0}' should not contain backticks", alias);
			Assert.IsFalse(alias.Contains("["), "alias '{0}' should not contain left bracket", alias);
			Assert.IsFalse(alias.Contains("]"), "alias '{0}' should not contain right bracket", alias);
		}

10. Example

Project: nant
Source File: CopyTest.cs
View license
[Test]
        public void Test_Copy_Subdirectories()
        {
            string newRootDir = Crea/n ..... /n //View Source file for more details /n }

11. Example

Project: MimeKit
Source File: ParseUtilsTests.cs
View license
[Test]
		public void TestTryParseBadDomains ()
		{
			var sentinels = new [] { (byte) ',' };

			for (int i = 0; i < BadDomains.Length; i++) {
				var buffer = Encoding.UTF8.GetBytes (BadDomains[i]);
				string domain;
				int index = 0;

				if (BadDomains[i][0] > 127)
					buffer = Encoding.Convert (Encoding.UTF8, Encoding.GetEncoding ("GB18030"), buffer);

				Assert.IsFalse (ParseUtils.TryParseDomain (buffer, ref index, buffer.Length, sentinels, false, out domain), "Should have failed to parse '{0}'.", BadDomains[i]);

				index = 0;

				var ex = Assert.Throws<ParseException> (() => ParseUtils.TryParseDomain (buffer, ref index, buffer.Length, sentinels, true, out domain), "Parsing '{0}' should have thrown.", BadDomains[i]);
				Assert.AreEqual (BadDomainTokenIndexes[i], ex.TokenIndex, "Unexpected token index.");
				Assert.AreEqual (BadDomainErrorIndexes[i], ex.ErrorIndex, "Unexpected error index.");
			}
		}

12. Example

Project: MimeKit
Source File: InternetAddressListTests.cs
View license
static void AssertTryParseFails (string text)
		{
			var buffer = Encoding.UTF8.GetBytes (text);
			InternetAddressList result;

			try {
				Assert.IsFalse (InternetAddressList.TryParse (text, out result), "InternetAddressList.TryParse() should fail to parse \"{0}\".", text);
			} catch (Exception ex) {
				Assert.Fail ("InternetAddressList.TryParse() should not throw an exception: {0}", ex);
			}

			try {
				Assert.IsFalse (InternetAddressList.TryParse (buffer, out result), "InternetAddressList.TryParse() should fail to parse \"{0}\".", text);
			} catch (Exception ex) {
				Assert.Fail ("InternetAddressList.TryParse() should not throw an exception: {0}", ex);
			}

			try {
				Assert.IsFalse (InternetAddressList.TryParse (buffer, 0, out result), "InternetAddressList.TryParse() should fail to parse \"{0}\".", text);
			} catch (Exception ex) {
				Assert.Fail ("InternetAddressList.TryParse() should not throw an exception: {0}", ex);
			}

			try {
				Assert.IsFalse (InternetAddressList.TryParse (buffer, 0, buffer.Length, out result), "InternetAddressList.TryParse() should fail to parse \"{0}\".", text);
			} catch (Exception ex) {
				Assert.Fail ("InternetAddressList.TryParse() should not throw an exception: {0}", ex);
			}
		}

13. Example

Project: MimeKit
Source File: ContentTypeTests.cs
View license
[Test]
		public void TestUnquotedParameterWithSpaces ()
		{
			const string text = "application/octe/n ..... /n //View Source file for more details /n }