IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Helper class with properties and methods that supply a number of constraints used in Asserts. More...
Static Public Member Functions | |
static CollectionContainsConstraint | Contain (object expected) |
Returns a new CollectionContainsConstraint checking for the presence of a particular object in the collection. More... | |
static ContainsConstraint | Contain (string expected) |
Returns a new ContainsConstraint. This constraint will, in turn, make use of the appropriate second-level constraint, depending on the type of the actual argument. This overload is only used if the item sought is a string, since any other type implies that we are looking for a collection member. More... | |
static StartsWithConstraint | StartWith (string expected) |
Returns a constraint that succeeds if the actual value starts with the substring supplied as an argument. More... | |
static EndsWithConstraint | EndWith (string expected) |
Returns a constraint that succeeds if the actual value ends with the substring supplied as an argument. More... | |
static RegexConstraint | Match (string pattern) |
Returns a constraint that succeeds if the actual value matches the regular expression supplied as an argument. More... | |
Properties | |
static ConstraintExpression | Not [get] |
Returns a ConstraintExpression that negates any following constraint. More... | |
static FileOrDirectoryExistsConstraint | Exist [get] |
Returns a constraint that succeeds if the value is a file or directory and it exists. More... | |
Helper class with properties and methods that supply a number of constraints used in Asserts.
|
inlinestatic |
Returns a new CollectionContainsConstraint checking for the presence of a particular object in the collection.
Referenced by NUnit.Framework.Assertions.CollectionAssertTest.AreEqual_UsingIterator_Fails(), NUnit.Framework.Assertions.CollectionAssertTest.AreEqual_UsingLinqQuery_Fails(), NUnit.Framework.Assertions.AssertThatTests.AssertThatWithFalseLambda(), NUnit.Framework.Tests.Compatibility.ReflectionExtensionsTests.CanGetInterfaces(), NUnit.Framework.StringAssert.Contains(), NUnit.Framework.Assertions.EqualsFixture.DoubleNotEqualMessageDisplaysDefaultTolerance(), NUnit.Framework.Assertions.EqualsFixture.DoubleNotEqualMessageDisplaysTolerance(), NUnit.Framework.Attributes.MaxTimeTests.ErrorReportHasPriorityOverMaxTime(), NUnit.Framework.Constraints.EqualConstraintTests.FloatingPointEquality.FailsOnDoublesOutsideOfRelativeTolerance(), NUnit.Framework.Constraints.EqualConstraintTests.FloatingPointEquality.FailsOnDoublesOutsideOfUlpTolerance(), NUnit.Framework.Constraints.EqualConstraintTests.FloatingPointEquality.FailsOnSinglesOutsideOfRelativeTolerance(), NUnit.Framework.Constraints.EqualConstraintTests.FloatingPointEquality.FailsOnSinglesOutsideOfUlpTolerance(), NUnit.Framework.Assertions.AssertThatTests.FailureThrowsAssertionException_ActualAndConstraintWithMessage(), NUnit.Framework.Assertions.AssertThatTests.FailureThrowsAssertionException_ActualAndConstraintWithMessageAndArgs(), NUnit.Framework.Assertions.AssertThatTests.FailureThrowsAssertionException_ActualLambdaAndConstraintWithMessage(), NUnit.Framework.Assertions.AssertThatTests.FailureThrowsAssertionException_ActualLambdaAndConstraintWithMessageAndArgs(), NUnit.Framework.Assertions.AssertThatTests.FailureThrowsAssertionException_BooleanWithMessage(), NUnit.Framework.Assertions.AssertThatTests.FailureThrowsAssertionException_BooleanWithMessageAndArgs(), NUnit.Framework.Assertions.AssertThatTests.FailureThrowsAssertionException_DelegateAndConstraintWithMessage(), NUnit.Framework.Assertions.AssertThatTests.FailureThrowsAssertionException_DelegateAndConstraintWithMessageAndArgs(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_ActualAndConstraintWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_ActualAndConstraintWithMessageAndArgs(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_ActualLambdaAndConstraintWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_ActualLambdaAndConstraintWithMessageAndArgs(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_BooleanLambdaWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_BooleanLambdaWithMessageAndArgs(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_BooleanWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_BooleanWithMessageAndArgs(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_DelegateAndConstraintWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_DelegateAndConstraintWithMessageAndArgs(), NUnit.Framework.Assertions.EqualsFixture.FloatNotEqualMessageDisplaysTolerance(), NUnit.Framework.Attributes.OneTimeSetupTearDownTest.HandleErrorInFixtureTearDown(), NUnit.Framework.Attributes.OneTimeSetupTearDownTest.HandleErrorInFixtureTearDownAfterErrorInFixtureSetUp(), NUnit.Framework.Attributes.OneTimeSetupTearDownTest.HandleErrorInFixtureTearDownAfterErrorInTest(), NUnit.Framework.Internal.SetUpTearDownTests.HandleExceptionInBothSetUpAndTearDown(), NUnit.Framework.Internal.SetUpTearDownTests.HandleExceptionInSetUp(), NUnit.Framework.Internal.SetUpTearDownTests.HandleExceptionInTearDown(), NUnit.Framework.Constraints.CollectionOrderedConstraintTests.IsOrdered_Handles_null(), NUnit.Framework.Assertions.CollectionAssertTest.IsOrdered_Handles_null(), NUnit.Framework.Attributes.MaxTimeTests.MaxTimeExceeded(), NUnit.Framework.Attributes.MaxTimeTests.MaxTimeExceededOnTestCase(), NUnit.Framework.Assertions.FileAssertTests.NonReadableStreamGivesException(), NUnit.Framework.Assertions.FileAssertTests.NonSeekableStreamGivesException(), NUnit.Framework.Constraints.NotConstraintTests.NotHonorsIgnoreCaseUsingConstructors(), NUnit.Framework.Constraints.NotConstraintTests.NotHonorsIgnoreCaseUsingPrefixNotation(), NUnit.Framework.Constraints.NotConstraintTests.NotHonorsTolerance(), NUnit.Framework.Internal.PlatformDetectionTests.PlatformAttribute_InvalidPlatform(), NUnit.Framework.Syntax.ContainsTest.SetUp(), NUnit.Framework.Syntax.ContainsTest_IgnoreCase.SetUp(), NUnit.Framework.Attributes.TimeoutTests.SetUpTimesOutAndTearDownIsRun(), NUnit.Framework.Tests.TestContextTests.TestContextStoresFailureInfoForTearDown(), NUnitLite.Tests.CreateTestFilterTests.TestListFileMissing(), NUnit.Framework.Attributes.TimeoutTests.TestTimeOutElapsed(), NUnit.Framework.Attributes.TimeoutTests.TestTimesOutAndTearDownIsRun(), and NUnit.Framework.Attributes.TimeoutTests.TimeoutCanBeSetOnTestFixture().
|
inlinestatic |
Returns a new ContainsConstraint. This constraint will, in turn, make use of the appropriate second-level constraint, depending on the type of the actual argument. This overload is only used if the item sought is a string, since any other type implies that we are looking for a collection member.
|
inlinestatic |
Returns a constraint that succeeds if the actual value starts with the substring supplied as an argument.
Referenced by NUnit.Framework.Assertions.AssertThrowsTests.BaseExceptionThrown(), NUnit.Engine.Services.Tests.DomainManagerTests.CanCreateDomain(), NUnit.Engine.Services.Tests.DomainManagerTests.CanCreateDomainWithApplicationBaseSpecified(), NUnit.Framework.Internal.TestFixtureTests.CannotRunGenericFixtureWithNoArgsProvided(), NUnit.Framework.Tests.ActionAttributeTests.CheckBeforeAfterActionPair(), NUnit.Framework.Assertions.AssertThrowsTests.CorrectExceptionIsReturnedToMethod(), NUnit.Framework.Assertions.AssertThrowsTests.DerivedExceptionThrown(), NUnitLite.Tests.TextUITests.DisplayHeader(), NUnitLite.Tests.TextUITests.DisplayHelp(), NUnitLite.Tests.TextUITests.DisplayRequestedOptions(), NUnit.Framework.Assertions.DirectoryAssertTests.DoesNotExistFailsWhenDirectoryInfoExists(), NUnit.Framework.Assertions.DirectoryAssertTests.DoesNotExistFailsWhenDirectoryInfoIsNull(), NUnit.Framework.Assertions.FileAssertTests.DoesNotExistFailsWhenFileInfoExists(), NUnit.Framework.Assertions.FileAssertTests.DoesNotExistFailsWhenFileInfoIsNull(), NUnit.Framework.Assertions.DirectoryAssertTests.DoesNotExistFailsWhenStringExists(), NUnit.Framework.Assertions.FileAssertTests.DoesNotExistFailsWhenStringExists(), NUnit.Framework.Assertions.DirectoryAssertTests.DoesNotExistFailsWhenStringIsEmpty(), NUnit.Framework.Assertions.FileAssertTests.DoesNotExistFailsWhenStringIsEmpty(), NUnit.Framework.Assertions.DirectoryAssertTests.DoesNotExistFailsWhenStringIsNull(), NUnit.Framework.Assertions.FileAssertTests.DoesNotExistFailsWhenStringIsNull(), NUnit.Framework.Assertions.DirectoryAssertTests.ExistsFailsWhenDirectoryInfoDoesNotExist(), NUnit.Framework.Assertions.DirectoryAssertTests.ExistsFailsWhenDirectoryInfoIsNull(), NUnit.Framework.Assertions.FileAssertTests.ExistsFailsWhenFileInfoDoesNotExist(), NUnit.Framework.Assertions.FileAssertTests.ExistsFailsWhenFileInfoIsNull(), NUnit.Framework.Assertions.DirectoryAssertTests.ExistsFailsWhenStringDoesNotExist(), NUnit.Framework.Assertions.FileAssertTests.ExistsFailsWhenStringDoesNotExist(), NUnit.Framework.Assertions.DirectoryAssertTests.ExistsFailsWhenStringIsEmpty(), NUnit.Framework.Assertions.FileAssertTests.ExistsFailsWhenStringIsEmpty(), NUnit.Framework.Assertions.DirectoryAssertTests.ExistsFailsWhenStringIsNull(), NUnit.Framework.Assertions.FileAssertTests.ExistsFailsWhenStringIsNull(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.FailsWhenDirectoryInfoIsNull(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.FailsWhenFileInfoIsNull(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.FailsWhenIgnoreDirectoriesIsTrueWithDirectoryInfo(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.FailsWhenIgnoreFilesIsTrueWithFileInfo(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.FailsWhenNotStringOrDirectoryInfo(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.FailsWhenStringIsEmpty(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.FailsWhenStringIsNull(), NUnit.Framework.Constraints.ThrowsConstraintTestBase.FailsWithBadValues(), NUnit.Framework.Internal.SetUpTearDownTests.HandleExceptionInTearDown(), NUnit.Framework.Constraints.AndConstraintTests.HandlesFirstPartFailing(), NUnit.Framework.Api.TestAssemblyRunnerTests.Load_BadFile_ReturnsNonRunnableSuite(), NUnit.Framework.Api.TestAssemblyRunnerTests.Load_FileNotFound_ReturnsNonRunnableSuite(), NUnit.Framework.Internal.PlatformDetectionTests.PlatformAttribute_InvalidPlatform(), NUnit.Framework.Api.TestAssemblyRunnerTests.Run_BadFile_ReturnsNonRunnableSuite(), NUnit.Framework.Api.TestAssemblyRunnerTests.Run_FileNotFound_ReturnsNonRunnableSuite(), NUnit.Framework.Api.TestAssemblyRunnerTests.RunAsync_BadFile_ReturnsNonRunnableSuite(), NUnit.Framework.Api.TestAssemblyRunnerTests.RunAsync_FileNotFound_ReturnsNonRunnableSuite(), NUnit.Framework.Syntax.StartsWithTest.SetUp(), NUnit.Framework.Syntax.TextStartsWithTest.SetUp(), NUnit.Framework.Syntax.StartsWithTest_IgnoreCase.SetUp(), NUnit.Framework.StringAssert.StartsWith(), and NUnit.Framework.Assertions.AssertThrowsTests.UnrelatedExceptionThrown().
|
inlinestatic |
Returns a constraint that succeeds if the actual value ends with the substring supplied as an argument.
Referenced by NUnit.Framework.Tests.ActionAttributeTests.CheckBeforeAfterActionPair(), NUnit.Framework.StringAssert.EndsWith(), NUnit.Framework.Syntax.EndsWithTest.SetUp(), NUnit.Framework.Syntax.EndsWithTest_IgnoreCase.SetUp(), NUnit.Framework.Syntax.AfterSyntaxUsingAnonymousDelegates.TextTest(), and NUnit.Framework.Syntax.AfterSyntaxUsingLambda.TextTest().
|
inlinestatic |
Returns a constraint that succeeds if the actual value matches the regular expression supplied as an argument.
Referenced by NUnit.Framework.Syntax.RegexTest.SetUp(), and NUnit.Framework.Syntax.RegexTest_IgnoreCase.SetUp().
|
staticget |
Returns a ConstraintExpression that negates any following constraint.
Referenced by NUnit.Framework.Tests.ActionAttributeTests.CheckActionsOnSuite(), NUnit.Framework.Tests.ActionAttributeTests.CheckActionsOnTestCase(), NUnit.Framework.StringAssert.DoesNotContain(), NUnit.Framework.StringAssert.DoesNotEndWith(), NUnit.Framework.StringAssert.DoesNotStartWith(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.FailsWhenDirectoryInfoDoesNotExist(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.FailsWhenDirectoryStringDoesNotExist(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.FailsWhenFileInfoDoesNotExist(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.FailsWhenFileStringDoesNotExist(), NUnit.Framework.Assertions.DirectoryAssertTests.SetUp(), and NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.SetUp().
|
staticget |
Returns a constraint that succeeds if the value is a file or directory and it exists.
Referenced by NUnit.Framework.Constraints.EmptyDirectoryConstraintTest.NotEmptyDirectory(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.PassesWhenDirectoryInfoExists(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.PassesWhenDirectoryStringExists(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.PassesWhenFileInfoExists(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.PassesWhenFileStringExists(), and NUnit.Engine.Services.Tests.RuntimeFrameworkServiceTests.SelectRuntimeFramework().