NUnit.Framework.Assert.False(bool)

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

200 Examples 7

1. Example

Project: Colore
Source File: ResultTests.cs
View license
[Test]
        public void FailureShouldImplicitCastToFalseBool()
        {
            bool test = Result.RzFailed;
            Assert.False(test);
        }

2. Example

Project: Colore
Source File: ResultTests.cs
View license
[Test]
        public void FailureShouldEqualFalse()
        {
            Assert.False(Result.RzFailed);
        }

3. Example

Project: Colore
Source File: ResultTests.cs
View license
[Test]
        public void SuccessPropertyShouldBeFalseOnFailure()
        {
            Assert.False(Result.RzFailed.Success);
        }

4. Example

Project: Colore
Source File: ResultTests.cs
View license
[Test]
        public void FailedPropertyShouldBeFalseOnSuccess()
        {
            Assert.False(Result.RzSuccess.Failed);
        }

5. Example

View license
[Test]
        public void Equals_DifferentBuild_ReturnsFalse()
        {
            // Arrange

            var version = new ClusterVersion(new System.Version(1, 0, 0), 100);

            // Act

            var result = version.Equals(new ClusterVersion(new System.Version(1, 0, 0), 101));

            // Assert

            Assert.False(result);
        }

6. Example

View license
[Test]
        public void HasSettings_DefaultObject_ReturnsFalse()
        {
            // Arrange

            var settings = new DeserializationOptions();

            // Act

            var result = settings.HasSettings;

            // Assert

            Assert.False(result);
        }

7. Example

View license
[Test]
        public void GetFormValues_NoPrettyCall_NoPrettyParam()
        {
            // Arrange

            var request = new QueryRequest("SELECT * FROM default");

            // Act

            var fields = request.GetFormValues();

            // Assert

            Assert.False(fields.Keys.Contains("pretty"));
        }

8. Example

View license
[Test]
        public void Equals_DifferentVersion_ReturnsTrue()
        {
            // Arrange

            var version = new ClusterVersion(new System.Version(1, 0, 0));

            // Act

            var result = version.Equals(new ClusterVersion(new System.Version(1, 1, 0)));

            // Assert

            Assert.False(result);
        }

9. Example

View license
[Test]
        public void Equals_DifferentSuffix_ReturnsFalse()
        {
            // Arrange

            var version = new ClusterVersion(new System.Version(1, 0, 0), 100, "suffix");

            // Act

            var result = version.Equals(new ClusterVersion(new System.Version(1, 0, 0), 100, "suffix2"));

            // Assert

            Assert.False(result);
        }

10. Example

View license
[Test]
        public void TryParse_BadVesion_ReturnsFalse()
        {
            // Act

            ClusterVersion version;
            var result = ClusterVersion.TryParse("abcd", out version);

            // Assert

            Assert.False(result);
        }

11. Example

View license
[Test]
        public void Equals_Null_ReturnsFalse()
        {
            // Arrange

            var version = new ClusterVersion(new System.Version(1, 0, 0));

            // Act

            var result = version.Equals(null);

            // Assert

            Assert.False(result);
        }

12. Example

View license
[Test]
        public void Equals_NotClusterVersion_ReturnsFalse()
        {
            // Arrange

            var version = new ClusterVersion(new System.Version(1, 0, 0));

            // Act

            var result = version.Equals(new object());

            // Assert

            Assert.False(result);
        }

13. Example

Project: OrigoDB
Source File: AuthorizerTests.cs
View license
[Test]
        public void DeniedIsDefault()
        {
            var authorizer = new Authorizer();
            Assert.False(authorizer.Allows(new object(), Thread.CurrentPrincipal));
        }

14. Example

View license
[Test]
        public void testIsEmergencyNumberWithPlusSign_US()
        {
            Assert.False(shortUtil.IsEmergencyNumber("+911", RegionCode.US));
            Assert.False(shortUtil.IsEmergencyNumber("\uFF0B911", RegionCode.US));
            Assert.False(shortUtil.IsEmergencyNumber(" +911", RegionCode.US));
            Assert.False(shortUtil.IsEmergencyNumber("+119", RegionCode.US));
            Assert.False(shortUtil.IsEmergencyNumber("+999", RegionCode.US));
        }

15. Example

View license
[Test]
        public void testIsEmergencyNumber_AO()
        {
            // Angola doesn't have any metadata for emergency numbers in the test metadata.
            Assert.False(shortUtil.IsEmergencyNumber("911", RegionCode.AO));
            Assert.False(shortUtil.IsEmergencyNumber("222123456", RegionCode.AO));
            Assert.False(shortUtil.IsEmergencyNumber("923123456", RegionCode.AO));
        }

16. Example

View license
[Test]
        public void testIsEmergencyNumberLongNumber_US()
        {
            Assert.False(shortUtil.IsEmergencyNumber("9116666666", RegionCode.US));
            Assert.False(shortUtil.IsEmergencyNumber("1196666666", RegionCode.US));
            Assert.False(shortUtil.IsEmergencyNumber("9996666666", RegionCode.US));
        }

17. Example

View license
[Test]
        public void TestIsNotValidNumber()
        {
            Assert.False(phoneUtil.IsValidNumber(US_LOCAL_NUMBER));

            PhoneNumber invalidNumber = new PhoneNumber.Builder()
                .SetCountryCode(39).SetNationalNumber(23661830000L).SetItalianLeadingZero(true).Build();
            Assert.False(phoneUtil.IsValidNumber(invalidNumber));

            invalidNumber = new PhoneNumber.Builder()
                .SetCountryCode(44).SetNationalNumber(791234567L).Build();
            Assert.False(phoneUtil.IsValidNumber(invalidNumber));

            invalidNumber = new PhoneNumber.Builder()
                .SetCountryCode(49).SetNationalNumber(1234L).Build();
            Assert.False(phoneUtil.IsValidNumber(invalidNumber));

            invalidNumber = new PhoneNumber.Builder()
                .SetCountryCode(64).SetNationalNumber(3316005L).Build();
            Assert.False(phoneUtil.IsValidNumber(invalidNumber));

            // Invalid country calling codes.
            invalidNumber = new PhoneNumber.Builder().SetCountryCode(3923).SetNationalNumber(2366L).Build();
            Assert.False(phoneUtil.IsValidNumber(invalidNumber));
            invalidNumber = new PhoneNumber.Builder().SetCountryCode(0).SetNationalNumber(2366L).Build();
            Assert.False(phoneUtil.IsValidNumber(invalidNumber));

            Assert.False(phoneUtil.IsValidNumber(INTERNATIONAL_TOLL_FREE_TOO_LONG));
        }

18. Example

View license
[Test]
        public void testConnectsToEmergencyNumberWithPlusSign_US()
        {
            Assert.False(shortUtil.ConnectsToEmergencyNumber("+911", RegionCode.US));
            Assert.False(shortUtil.ConnectsToEmergencyNumber("\uFF0B911", RegionCode.US));
            Assert.False(shortUtil.ConnectsToEmergencyNumber(" +911", RegionCode.US));
            Assert.False(shortUtil.ConnectsToEmergencyNumber("+119", RegionCode.US));
            Assert.False(shortUtil.ConnectsToEmergencyNumber("+999", RegionCode.US));
        }

19. Example

View license
[Test]
        public void testConnectsToEmergencyNumberLongNumber_BR()
        {
            // Brazilian emergency numbers don't work when additional digits are appended.
            Assert.False(shortUtil.ConnectsToEmergencyNumber("9111", RegionCode.BR));
            Assert.False(shortUtil.ConnectsToEmergencyNumber("1900", RegionCode.BR));
            Assert.False(shortUtil.ConnectsToEmergencyNumber("9996", RegionCode.BR));
        }

20. Example

View license
[Test]
        public void TestIsValidNumberTypeWithInvalidInput()
        {
            Assert.False(BuildMetadataFromXml.IsValidNumberType("invalidType"));
        }

21. Example

View license
[Test]
        public void testIsEmergencyNumberLongNumber_BR()
        {
            Assert.False(shortUtil.IsEmergencyNumber("9111", RegionCode.BR));
            Assert.False(shortUtil.IsEmergencyNumber("1900", RegionCode.BR));
            Assert.False(shortUtil.IsEmergencyNumber("9996", RegionCode.BR));
        }

22. Example

View license
[Test]
        public void testIsEmergencyNumber_ZW()
        {
            // Zimbabwe doesn't have any metadata in the test metadata.
            Assert.False(shortUtil.IsEmergencyNumber("911", RegionCode.ZW));
            Assert.False(shortUtil.IsEmergencyNumber("01312345", RegionCode.ZW));
            Assert.False(shortUtil.IsEmergencyNumber("0711234567", RegionCode.ZW));
        }

23. Example

View license
[Test]
        public void TestIsNotPossibleNumber()
        {
            Assert.False(phoneUtil.IsPossibleNumber(US_LONG_NUMBER));
            Assert.False(phoneUtil.IsPossibleNumber(INTERNATIONAL_TOLL_FREE_TOO_LONG));

            PhoneNumber number = new PhoneNumber.Builder()
                .SetCountryCode(1).SetNationalNumber(253000L).Build();
            Assert.False(phoneUtil.IsPossibleNumber(number));

            number = new PhoneNumber.Builder()
                .SetCountryCode(44).SetNationalNumber(300L).Build();
            Assert.False(phoneUtil.IsPossibleNumber(number));

            Assert.False(phoneUtil.IsPossibleNumber("+1 650 253 00000", RegionCode.US));
            Assert.False(phoneUtil.IsPossibleNumber("(650) 253-00000", RegionCode.US));
            Assert.False(phoneUtil.IsPossibleNumber("I want a Pizza", RegionCode.US));
            Assert.False(phoneUtil.IsPossibleNumber("253-000", RegionCode.US));
            Assert.False(phoneUtil.IsPossibleNumber("1 3000", RegionCode.GB));
            Assert.False(phoneUtil.IsPossibleNumber("+44 300", RegionCode.GB));
            Assert.False(phoneUtil.IsPossibleNumber("+800 1234 5678 9", RegionCode.UN001));
        }

24. Example

View license
[Test]
        public void TestUnknownCountryCallingCodeForValidation()
        {
            PhoneNumber invalidNumber = new PhoneNumber.Builder()
                .SetCountryCode(0).SetNationalNumber(1234L).Build();
            Assert.False(phoneUtil.IsValidNumber(invalidNumber));
        }

25. Example

View license
[Test]
        public void testConnectsToEmergencyNumber_ZW()
        {
            // Zimbabwe doesn't have any metadata in the test metadata.
            Assert.False(shortUtil.ConnectsToEmergencyNumber("911", RegionCode.ZW));
            Assert.False(shortUtil.ConnectsToEmergencyNumber("01312345", RegionCode.ZW));
            Assert.False(shortUtil.ConnectsToEmergencyNumber("0711234567", RegionCode.ZW));
        }

26. Example

View license
[Test]
        public void testConnectsToEmergencyNumber_AO()
        {
            // Angola doesn't have any metadata for emergency numbers in the test metadata.
            Assert.False(shortUtil.ConnectsToEmergencyNumber("911", RegionCode.AO));
            Assert.False(shortUtil.ConnectsToEmergencyNumber("222123456", RegionCode.AO));
            Assert.False(shortUtil.ConnectsToEmergencyNumber("923123456", RegionCode.AO));
        }

27. Example

Project: Mages
Source File: PrimeNumberTests.cs
View license
[Test]
        public void ZeroIsNotPrime()
        {
            var result = PrimeNumber.Check(0);
            Assert.False(result);
        }

28. Example

Project: Mages
Source File: PrimeNumberTests.cs
View license
[Test]
        public void LargeIsNotPrime()
        {
            var result = PrimeNumber.Check(1373653);
            Assert.False(result);
        }

29. Example

Project: Mages
Source File: PrimeNumberTests.cs
View license
[Test]
        public void NegativeIsNotPrime()
        {
            var result = PrimeNumber.Check(-1);
            Assert.False(result);
        }

30. Example

Project: Mages
Source File: PrimeNumberTests.cs
View license
[Test]
        public void OneIsNotPrime()
        {
            var result = PrimeNumber.Check(1);
            Assert.False(result);
        }

31. Example

Project: Mages
Source File: PrimeNumberTests.cs
View license
[Test]
        public void EightIsNotPrime()
        {
            var result = PrimeNumber.Check(8);
            Assert.False(result);
        }

32. Example

Project: AssertMessage
Source File: NunitTests.cs
View license
public void False_should_have_message()
        {
            var actual = true;

            Assert.False(actual);
        }

33. Example

Project: FAtiMA-Toolkit
Source File: ConditionsTests.cs
View license
[Test]
		public void Test_Fail_FalsePerdicate()
		{
			var kb = new KB((Name)"John");
			var c = Condition.Parse("Likes(Formal) = false");

			Assert.False(c.Evaluate(kb, Name.SELF_SYMBOL, new[] {new SubstitutionSet()}));
		}

34. Example

Project: gauge-csharp
Source File: StepRegistryTests.cs
View license
[Test]
        public void ShouldNotHaveAliasWhenSingleStepTextIsDefined()
        {
            var methods = new[]
            {
                new KeyValuePair<string, GaugeMethod>("Foo", new GaugeMethod {Name = "Foo"}),
                new KeyValuePair<string, GaugeMethod>("Bar", new GaugeMethod {Name = "Bar"})
            };
            var stepRegistry = new StepRegistry(methods, null, new Dictionary<string, bool>());

            Assert.False(stepRegistry.HasAlias("Foo"));
            Assert.False(stepRegistry.HasAlias("Bar"));
        }

35. Example

View license
[Test]
    public void ShouldReportWhenItIsNotDerivedFromException()
    {
      Assert.False(SmartType.For(typeof(string)).IsException());
    }

36. Example

Project: NodaTime
Source File: ZoneTransitionTest.cs
View license
[Test]
        public void IsTransitionFrom_earlierInstantAndUnequalName_false()
        {
            var newValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.Zero);
            var oldValue = new ZoneTransition(Instant.UnixEpoch + Duration.One, "qwe", Offset.Zero, Offset.Zero);
            Assert.False(newValue.IsTransitionFrom(oldValue));
        }

37. Example

Project: NodaTime
Source File: ZoneTransitionTest.cs
View license
[Test]
        public void IsTransitionFrom_laterInstantAndEqualButOppositeStandardAndSavings_false()
        {
            var newValue = new ZoneTransition(Instant.UnixEpoch + Duration.One, "abc", Offset.FromHours(1), Offset.Zero);
            var oldValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.FromHours(1));
            Assert.False(newValue.IsTransitionFrom(oldValue));
        }

38. Example

Project: NodaTime
Source File: ZoneTransitionTest.cs
View license
[Test]
        public void ISTransitionFrom_unequalStandardOffset_false()
        {
            var newValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.Zero);
            var oldValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.MaxValue, Offset.Zero);
            Assert.False(newValue.IsTransitionFrom(oldValue));
        }

39. Example

Project: NodaTime
Source File: ZoneTransitionTest.cs
View license
[Test]
        public void IsTransitionFrom_earlierInstantAndUnequalSavings_false()
        {
            var newValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.Zero);
            var oldValue = new ZoneTransition(Instant.UnixEpoch + Duration.One, "abc", Offset.Zero, Offset.MaxValue);
            Assert.False(newValue.IsTransitionFrom(oldValue));
        }

40. Example

Project: NodaTime
Source File: ZoneTransitionTest.cs
View license
[Test]
        public void IsTransitionFrom_laterInstant_false()
        {
            var newValue = new ZoneTransition(Instant.UnixEpoch + Duration.One, "abc", Offset.Zero, Offset.Zero);
            var oldValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.Zero);
            Assert.False(newValue.IsTransitionFrom(oldValue));
        }

41. Example

Project: NodaTime
Source File: ZoneTransitionTest.cs
View license
[Test]
        public void IsTransitionFrom_earlierInstant_false()
        {
            var newValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.Zero);
            var oldValue = new ZoneTransition(Instant.UnixEpoch + Duration.One, "abc", Offset.Zero, Offset.Zero);
            Assert.False(newValue.IsTransitionFrom(oldValue));
        }

42. Example

Project: NodaTime
Source File: ZoneTransitionTest.cs
View license
[Test]
        public void IsTransitionFrom_unequalName_false()
        {
            var newValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.Zero);
            var oldValue = new ZoneTransition(Instant.UnixEpoch, "qwe", Offset.Zero, Offset.Zero);
            Assert.False(newValue.IsTransitionFrom(oldValue));
        }

43. Example

Project: NodaTime
Source File: ZoneTransitionTest.cs
View license
[Test]
        public void IsTransitionFrom_identity_false()
        {
            var value = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.Zero);
            Assert.False(value.IsTransitionFrom(value));
        }

44. Example

Project: NodaTime
Source File: ZoneTransitionTest.cs
View license
[Test]
        public void IsTransitionFrom_earlierInstantAndUnequalStandardOffset_false()
        {
            var newValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.Zero);
            var oldValue = new ZoneTransition(Instant.UnixEpoch + Duration.One, "abc", Offset.MaxValue, Offset.Zero);
            Assert.False(newValue.IsTransitionFrom(oldValue));
        }

45. Example

Project: NodaTime
Source File: InstantTest.Operators.cs
View license
[Test]
        public void IEquatableEquals_WithDifferentTicks_IsFalse()
        {
            Assert.False(one.Equals(negativeOne), "1 == -1");
            Assert.False(one.Equals(threeMillion), "1 == 3,000,000");
            Assert.False(one.Equals(negativeFiftyMillion), "1 == -50,000,000");
            Assert.False(Instant.MinValue.Equals(Instant.MaxValue), "MinValue == MaxValue");
        }

46. Example

Project: NodaTime
Source File: ZoneTransitionTest.cs
View license
[Test]
        public void IsTransitionFrom_unequalSavings_false()
        {
            var newValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.Zero);
            var oldValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.MaxValue);
            Assert.False(newValue.IsTransitionFrom(oldValue));
        }

47. Example

View license
[Test]
        public void IEquatableEquals_WithDifferentTicks_IsFalse()
        {
            Assert.False(one.Equals(negativeOne), "1 == -1");
            Assert.False(one.Equals(threeMillion), "1 == 3,000,000");
            Assert.False(one.Equals(negativeFiftyMillion), "1 == -50,000,000");
            Assert.False(LocalInstant.MinValue.Equals(LocalInstant.MaxValue), "MinValue == MaxValue");
        }

48. Example

Project: NodaTime
Source File: ZoneTransitionTest.cs
View license
[Test]
        public void IsTransitionFrom_equalObject_false()
        {
            var newValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.Zero);
            var oldValue = new ZoneTransition(Instant.UnixEpoch, "abc", Offset.Zero, Offset.Zero);
            Assert.False(newValue.IsTransitionFrom(oldValue));
        }

49. Example

Project: redfoxmq
Source File: RedFoxEndpointTests.cs
View license
[Test]
        public void Equals_different_Port_false()
        {
            var endpoint = new RedFoxEndpoint { Port = 1234 };

            Assert.False(endpoint.Equals(new RedFoxEndpoint()));
            Assert.False(endpoint.Equals((object)new RedFoxEndpoint()));
        }

50. Example

Project: redfoxmq
Source File: RedFoxEndpointTests.cs
View license
[Test]
        public void Equals_different_Transport_false()
        {
            var endpoint = new RedFoxEndpoint { Transport = (RedFoxTransport)255 };

            Assert.False(endpoint.Equals(new RedFoxEndpoint()));
            Assert.False(endpoint.Equals((object)new RedFoxEndpoint()));
        }