IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Framework.Does Class Reference

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...
 

Detailed Description

Helper class with properties and methods that supply a number of constraints used in Asserts.

Member Function Documentation

static CollectionContainsConstraint NUnit.Framework.Does.Contain ( object  expected)
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().

static ContainsConstraint NUnit.Framework.Does.Contain ( string  expected)
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.

static StartsWithConstraint NUnit.Framework.Does.StartWith ( string  expected)
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().

static RegexConstraint NUnit.Framework.Does.Match ( string  pattern)
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().

Property Documentation


The documentation for this class was generated from the following file: