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.Assume Class Reference

Provides static methods to express the assumptions that must be met for a test to give a meaningful result. If an assumption is not met, the test should produce an inconclusive result. More...

Static Public Member Functions

static new bool Equals (object a, object b)
 The Equals method throws an AssertionException. This is done to make sure there is no mistake by calling this function. More...
 
static new void ReferenceEquals (object a, object b)
 override the default ReferenceEquals to throw an AssertionException. This implementation makes sure there is no mistake in calling this function as part of Assert. More...
 
static void That< TActual > (ActualValueDelegate< TActual > del, IResolveConstraint expr)
 Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an InconclusiveException on failure. More...
 
static void That< TActual > (ActualValueDelegate< TActual > del, IResolveConstraint expr, string message, params object[] args)
 Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an InconclusiveException on failure. More...
 
static void That (bool condition, string message, params object[] args)
 Asserts that a condition is true. If the condition is false the method throws an InconclusiveException. More...
 
static void That (bool condition)
 Asserts that a condition is true. If the condition is false the method throws an InconclusiveException. More...
 
static void That (Func< bool > condition, string message, params object[] args)
 Asserts that a condition is true. If the condition is false the method throws an InconclusiveException. More...
 
static void That (Func< bool > condition)
 Asserts that a condition is true. If the condition is false the method throws an InconclusiveException. More...
 
static void That (TestDelegate code, IResolveConstraint constraint)
 Asserts that the code represented by a delegate throws an exception that satisfies the constraint provided. More...
 
static void That< TActual > (TActual actual, IResolveConstraint expression)
 Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an InconclusiveException on failure. More...
 
static void That< TActual > (TActual actual, IResolveConstraint expression, string message, params object[] args)
 Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an InconclusiveException on failure. More...
 

Detailed Description

Provides static methods to express the assumptions that must be met for a test to give a meaningful result. If an assumption is not met, the test should produce an inconclusive result.

Member Function Documentation

static new bool NUnit.Framework.Assume.Equals ( object  a,
object  b 
)
inlinestatic

The Equals method throws an AssertionException. This is done to make sure there is no mistake by calling this function.

Parameters
a
b
static new void NUnit.Framework.Assume.ReferenceEquals ( object  a,
object  b 
)
inlinestatic

override the default ReferenceEquals to throw an AssertionException. This implementation makes sure there is no mistake in calling this function as part of Assert.

Parameters
a
b
static void NUnit.Framework.Assume.That< TActual > ( ActualValueDelegate< TActual >  del,
IResolveConstraint  expr 
)
inlinestatic

Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an InconclusiveException on failure.

Parameters
exprA Constraint expression to be applied
delAn ActualValueDelegate returning the value to be tested
static void NUnit.Framework.Assume.That< TActual > ( ActualValueDelegate< TActual >  del,
IResolveConstraint  expr,
string  message,
params object[]  args 
)
inlinestatic

Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an InconclusiveException on failure.

Parameters
delAn ActualValueDelegate returning the value to be tested
exprA Constraint expression to be applied
messageThe message that will be displayed on failure
argsArguments to be used in formatting the message
static void NUnit.Framework.Assume.That ( bool  condition,
string  message,
params object[]  args 
)
inlinestatic

Asserts that a condition is true. If the condition is false the method throws an InconclusiveException.

Parameters
conditionThe evaluated condition
messageThe message to display if the condition is false
argsArguments to be used in formatting the message

Referenced by NUnit.Framework.Tests.ActionAttributeTests.ActionsWrappingParameterizedMethodSuite(), NUnit.Framework.Assertions.ArrayEqualsFixture.ArrayAndArraySegment(), NUnit.Framework.Assertions.ArrayEqualsFixture.ArrayAndEmptyArraySegment(), NUnit.Framework.Assertions.ArrayEqualsFixture.ArraySegmentAndArray(), NUnit.TestData.TestContextData.TestTestContextInOneTimeTearDown.AssumeSomething(), NUnit.TestData.TestContextData.TestTestContextInOneTimeTearDown.AssumeSomethingElse(), NUnit.TestData.TestContextData.TestTestContextInOneTimeTearDown.AssumeTheWorldIsFlat(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_ActualAndConstraint(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_ActualAndConstraintWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_ActualAndConstraintWithMessageAndArgs(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_ActualLambdaAndConstraint(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_ActualLambdaAndConstraintWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_ActualLambdaAndConstraintWithMessageAndArgs(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_Boolean(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_BooleanLambda(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_BooleanLambdaWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_BooleanLambdaWithMessageAndArgs(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_BooleanWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_BooleanWithMessageAndArgs(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_DelegateAndConstraint(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_DelegateAndConstraintWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.AssumptionPasses_DelegateAndConstraintWithMessageAndArgs(), NUnit.Engine.Tests.RuntimeFrameworkTests.CanCreateUsingClrVersion(), NUnit.Framework.Internal.RuntimeFrameworkTests.CanCreateUsingClrVersion(), NUnit.Framework.Constraints.ReusableConstraintTests.CanReuseReusableConstraintMultipleTimes(), NUnitLite.Tests.NUnit2XmlOutputWriterTests.Document_FirstChildIsXmlDeclaration(), NUnit.Engine.Services.ResultWriters.Tests.NUnit2XmlResultWriterTests.Document_FirstChildIsXmlDeclaration(), NUnitLite.Tests.NUnit2XmlOutputWriterTests.Document_SecondChildIsComment(), NUnit.Engine.Services.ResultWriters.Tests.NUnit2XmlResultWriterTests.Document_SecondChildIsComment(), NUnitLite.Tests.NUnit2XmlOutputWriterTests.Document_ThirdChildIsTestResults(), NUnit.Engine.Services.ResultWriters.Tests.NUnit2XmlResultWriterTests.Document_ThirdChildIsTestResults(), NUnit.Framework.Assertions.ArrayEqualsFixture.EmptyArraySegmentAndArray(), NUnit.Engine.Services.Tests.ExtensionServiceTests.ExtensionsAreAddedToExtensionPoint(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_ActualAndConstraint(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_ActualAndConstraintWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_ActualAndConstraintWithMessageAndArgs(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_ActualLambdaAndConstraint(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_ActualLambdaAndConstraintWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_ActualLambdaAndConstraintWithMessageAndArgs(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_Boolean(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_BooleanLambda(), 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_DelegateAndConstraint(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_DelegateAndConstraintWithMessage(), NUnit.Framework.Assertions.AssumeThatTests.FailureThrowsInconclusiveException_DelegateAndConstraintWithMessageAndArgs(), NUnit.Framework.Constraints.EqualConstraintTests.DateTimeOffsetShouldBeSame.NegativeEqualityTest(), NUnit.Framework.Constraints.EqualConstraintTests.DateTimeOffsetShouldBeSame.NegativeEqualityTestWithinToleranceAndWithSameOffset(), NUnit.Framework.Constraints.EqualConstraintTests.DateTimeOffsetShouldBeSame.NegativeEqualityTestWithTolerance(), NUnit.Framework.Constraints.EqualConstraintTests.DateTimeOffsetShouldBeSame.NegativeEqualityTestWithToleranceAndWithSameOffset(), NUnit.TestData.TestContextData.TestTestContextInOneTimeTearDown.NeverAssume(), NUnit.Framework.Constraints.EmptyDirectoryConstraintTest.NotEmptyDirectory(), NUnit.Framework.Constraints.EqualConstraintTests.DateTimeOffsetShouldBeSame.PositiveEqualityTest(), NUnit.Framework.Constraints.EqualConstraintTests.DateTimeOffsetShouldBeSame.PositiveEqualityTestWithTolerance(), NUnit.Framework.Constraints.EqualConstraintTests.DateTimeOffsetShouldBeSame.PositiveEqualityTestWithToleranceAndWithSameOffset(), NUnit.Engine.Services.Tests.RuntimeFrameworkServiceTests.SelectRuntimeFramework(), NUnit.ConsoleRunner.Tests.ColorConsoleTests.SetUp(), NUnit.Framework.Assertions.DirectoryAssertTests.SetUp(), NUnit.Framework.Tests.Constraints.FileOrDirectoryExistsConstraintTests.SetUp(), NUnit.TestData.DatapointFixture.SquareRootTest.SqrtTimesItselfGivesOriginal(), NUnit.Framework.Attributes.TheoryTests.SqrtTests.SqrtTimesItselfGivesOriginal(), NUnit.Framework.Attributes.TheoryTests.SquareRootTest(), NUnit.TestUtilities.TestDirectory.TestDirectory(), NUnit.TestData.TheoryFixture.TheoryFixture.TestWithAllBadValues(), NUnit.Framework.Assume.That(), NUnit.Framework.Assume.That< TActual >(), NUnit.Framework.Assertions.ArrayEqualsFixture.TwoArraySegments(), and NUnit.Framework.Assertions.ArrayEqualsFixture.TwoEmptyArraySegments().

static void NUnit.Framework.Assume.That ( bool  condition)
inlinestatic

Asserts that a condition is true. If the condition is false the method throws an InconclusiveException.

Parameters
conditionThe evaluated condition

References NUnit.Framework.Assume.That(), and NUnit.Framework.Is.True.

static void NUnit.Framework.Assume.That ( Func< bool >  condition,
string  message,
params object[]  args 
)
inlinestatic

Asserts that a condition is true. If the condition is false the method throws an InconclusiveException.

Parameters
conditionA lambda that returns a Boolean
messageThe message to display if the condition is false
argsArguments to be used in formatting the message
static void NUnit.Framework.Assume.That ( Func< bool >  condition)
inlinestatic

Asserts that a condition is true. If the condition is false the method throws an InconclusiveException.

Parameters
conditionA lambda that returns a Boolean

References NUnit.Framework.Assume.That(), and NUnit.Framework.Is.True.

static void NUnit.Framework.Assume.That ( TestDelegate  code,
IResolveConstraint  constraint 
)
inlinestatic

Asserts that the code represented by a delegate throws an exception that satisfies the constraint provided.

Parameters
codeA TestDelegate to be executed
constraintA ThrowsConstraint used in the test

References NUnit.Framework.Assume.That().

static void NUnit.Framework.Assume.That< TActual > ( TActual  actual,
IResolveConstraint  expression 
)
inlinestatic

Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an InconclusiveException on failure.

Parameters
expressionA Constraint to be applied
actualThe actual value to test

References NUnit.Framework.Assume.That().

static void NUnit.Framework.Assume.That< TActual > ( TActual  actual,
IResolveConstraint  expression,
string  message,
params object[]  args 
)
inlinestatic

Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an InconclusiveException on failure.

Parameters
expressionA Constraint expression to be applied
actualThe actual value to test
messageThe message that will be displayed on failure
argsArguments to be used in formatting the message

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