├── .gitignore
├── CHANGES.txt
├── LICENSE.txt
├── NUnitLite.nuspec
├── NUnitLite.sln
├── NUnitLiteCF.sln
├── README.txt
├── nant.bat
├── nunitlite.build
├── nunitlite.build.include
├── src
├── TestResultConsole
│ ├── AssemblyInfo.cs
│ ├── Program.cs
│ └── TestResultConsole.csproj
├── framework
│ ├── Api
│ │ ├── ExpectedExceptionData.cs
│ │ ├── FailureSite.cs
│ │ ├── IParameterDataSource.cs
│ │ ├── IPropertyBag.cs
│ │ ├── ITest.cs
│ │ ├── ITestAssemblyBuilder.cs
│ │ ├── ITestAssemblyRunner.cs
│ │ ├── ITestCaseData.cs
│ │ ├── ITestCaseSource.cs
│ │ ├── ITestCaseSourceProvider.cs
│ │ ├── ITestFilter.cs
│ │ ├── ITestListener.cs
│ │ ├── ITestResult.cs
│ │ ├── IXmlNodeBuilder.cs
│ │ ├── PropertyEntry.cs
│ │ ├── ResultState.cs
│ │ ├── RunState.cs
│ │ ├── TestOutput.cs
│ │ ├── TestStatus.cs
│ │ └── XmlNode.cs
│ ├── AssemblyInfo.cs
│ ├── Assert.cs
│ ├── AssertionHelper.cs
│ ├── Assume.cs
│ ├── Attributes
│ │ ├── CategoryAttribute.cs
│ │ ├── CombinatorialAttribute.cs
│ │ ├── CultureAttribute.cs
│ │ ├── DataAttribute.cs
│ │ ├── DatapointAttribute.cs
│ │ ├── DatapointSourceAttribute.cs
│ │ ├── DatapointsAttribute.cs
│ │ ├── DescriptionAttribute.cs
│ │ ├── ExpectedExceptionAttribute.cs
│ │ ├── ExplicitAttribute.cs
│ │ ├── IgnoreAttribute.cs
│ │ ├── IncludeExcludeAttribute.cs
│ │ ├── MaxTimeAttribute.cs
│ │ ├── NUnitAttribute.cs
│ │ ├── PairwiseAttribute.cs
│ │ ├── PlatformAttribute.cs
│ │ ├── PropertyAttribute.cs
│ │ ├── RandomAttribute.cs
│ │ ├── RangeAttribute.cs
│ │ ├── RepeatAttribute.cs
│ │ ├── SequentialAttribute.cs
│ │ ├── SetCultureAttribute.cs
│ │ ├── SetUICultureAttribute.cs
│ │ ├── SetUpAttribute.cs
│ │ ├── TearDownAttribute.cs
│ │ ├── TestAttribute.cs
│ │ ├── TestCaseAttribute.cs
│ │ ├── TestCaseSourceAttribute.cs
│ │ ├── TestFixtureAttribute.cs
│ │ ├── TestFixtureSetUpAttribute.cs
│ │ ├── TestFixtureTearDownAttribute.cs
│ │ ├── TheoryAttribute.cs
│ │ ├── TimeoutAttribute.cs
│ │ ├── ValueSourceAttribute.cs
│ │ └── ValuesAttribute.cs
│ ├── Compatibility
│ │ └── SerializableAttribute.cs
│ ├── Constraints
│ │ ├── AllItemsConstraint.cs
│ │ ├── AndConstraint.cs
│ │ ├── AssignableFromConstraint.cs
│ │ ├── AssignableToConstraint.cs
│ │ ├── AttributeConstraint.cs
│ │ ├── AttributeExistsConstraint.cs
│ │ ├── BasicConstraint.cs
│ │ ├── BinaryConstraint.cs
│ │ ├── BinarySerializableConstraint.cs
│ │ ├── CollectionConstraint.cs
│ │ ├── CollectionContainsConstraint.cs
│ │ ├── CollectionEquivalentConstraint.cs
│ │ ├── CollectionItemsEqualConstraint.cs
│ │ ├── CollectionOrderedConstraint.cs
│ │ ├── CollectionSubsetConstraint.cs
│ │ ├── CollectionSupersetConstraint.cs
│ │ ├── CollectionTally.cs
│ │ ├── ComparisonAdapter.cs
│ │ ├── ComparisonConstraint.cs
│ │ ├── Constraint.cs
│ │ ├── ConstraintBuilder.cs
│ │ ├── ConstraintExpression.cs
│ │ ├── ConstraintExpressionBase.cs
│ │ ├── ConstraintFactory.cs
│ │ ├── ContainsConstraint.cs
│ │ ├── DelayedConstraint.cs
│ │ ├── EmptyCollectionConstraint.cs
│ │ ├── EmptyConstraint.cs
│ │ ├── EmptyDirectoryConstraint.cs
│ │ ├── EmptyStringConstraint.cs
│ │ ├── EndsWithConstraint.cs
│ │ ├── EqualConstraint.cs
│ │ ├── EqualityAdapter.cs
│ │ ├── ExactCountConstraint.cs
│ │ ├── ExactTypeConstraint.cs
│ │ ├── ExceptionTypeConstraint.cs
│ │ ├── FailurePoint.cs
│ │ ├── FalseConstraint.cs
│ │ ├── FloatingPointNumerics.cs
│ │ ├── GreaterThanConstraint.cs
│ │ ├── GreaterThanOrEqualConstraint.cs
│ │ ├── IResolveConstraint.cs
│ │ ├── InstanceOfTypeConstraint.cs
│ │ ├── LessThanConstraint.cs
│ │ ├── LessThanOrEqualConstraint.cs
│ │ ├── MessageWriter.cs
│ │ ├── MsgUtils.cs
│ │ ├── NUnitComparer.cs
│ │ ├── NUnitEqualityComparer.cs
│ │ ├── NaNConstraint.cs
│ │ ├── NoItemConstraint.cs
│ │ ├── NotConstraint.cs
│ │ ├── NullConstraint.cs
│ │ ├── NullOrEmptyStringConstraint.cs
│ │ ├── Numerics.cs
│ │ ├── Operators
│ │ │ ├── AllOperator.cs
│ │ │ ├── AndOperator.cs
│ │ │ ├── AttributeOperator.cs
│ │ │ ├── BinaryOperator.cs
│ │ │ ├── CollectionOperator.cs
│ │ │ ├── ConstraintOperator.cs
│ │ │ ├── ExactCountOperator.cs
│ │ │ ├── NoneOperator.cs
│ │ │ ├── NotOperator.cs
│ │ │ ├── OrOperator.cs
│ │ │ ├── PrefixOperator.cs
│ │ │ ├── PropOperator.cs
│ │ │ ├── SelfResolvingOperator.cs
│ │ │ ├── SomeOperator.cs
│ │ │ ├── ThrowsOperator.cs
│ │ │ └── WithOperator.cs
│ │ ├── OrConstraint.cs
│ │ ├── PathConstraint.cs
│ │ ├── PredicateConstraint.cs
│ │ ├── PrefixConstraint.cs
│ │ ├── PropertyConstraint.cs
│ │ ├── PropertyExistsConstraint.cs
│ │ ├── RangeConstraint.cs
│ │ ├── RegexConstraint.cs
│ │ ├── ResolvableConstraintExpression.cs
│ │ ├── ReusableConstraint.cs
│ │ ├── SameAsConstraint.cs
│ │ ├── SamePathConstraint.cs
│ │ ├── SamePathOrUnderConstraint.cs
│ │ ├── SomeItemsConstraint.cs
│ │ ├── StartsWithConstraint.cs
│ │ ├── StringConstraint.cs
│ │ ├── SubPathConstraint.cs
│ │ ├── SubstringConstraint.cs
│ │ ├── ThrowsConstraint.cs
│ │ ├── ThrowsNothingConstraint.cs
│ │ ├── Tolerance.cs
│ │ ├── ToleranceMode.cs
│ │ ├── TrueConstraint.cs
│ │ ├── TypeConstraint.cs
│ │ ├── UniqueItemsConstraint.cs
│ │ └── XmlSerializableConstraint.cs
│ ├── Contains.cs
│ ├── Env.cs
│ ├── Exceptions
│ │ ├── AssertionException.cs
│ │ ├── IgnoreException.cs
│ │ ├── InconclusiveException.cs
│ │ └── SuccessException.cs
│ ├── Extensibility
│ │ ├── IParameterDataProvider.cs
│ │ ├── ISuiteBuilder.cs
│ │ ├── ITestCaseBuilder.cs
│ │ └── ITestCaseProvider.cs
│ ├── GlobalSettings.cs
│ ├── Guard.cs
│ ├── GuiUnit.sln
│ ├── GuiUnit
│ │ ├── AdditionalAsserts.cs
│ │ ├── GtkMainLoopIntegration.cs
│ │ ├── IMainLoopIntegration.cs
│ │ ├── InvokerHelper.cs
│ │ ├── MainLoopCommand.cs
│ │ ├── MonoMacMainLoopIntegration.cs
│ │ ├── TestRunner.cs
│ │ ├── XmlTestListener.cs
│ │ └── XwtMainLoopIntegration.cs
│ ├── GuiUnit_MT.csproj
│ ├── GuiUnit_NET_4_0.csproj
│ ├── GuiUnit_NET_4_5.csproj
│ ├── GuiUnit_xammac_mobile.csproj
│ ├── Has.cs
│ ├── IExpectException.cs
│ ├── Info.plist
│ ├── Internal
│ │ ├── AssemblyHelper.cs
│ │ ├── AsyncInvocationRegion.cs
│ │ ├── AsyncSynchronizationContext.cs
│ │ ├── Builders
│ │ │ ├── CombinatorialStrategy.cs
│ │ │ ├── CombinatorialTestCaseProvider.cs
│ │ │ ├── CombiningStrategy.cs
│ │ │ ├── DataAttributeTestCaseProvider.cs
│ │ │ ├── DatapointProvider.cs
│ │ │ ├── NUnitTestCaseBuilder.cs
│ │ │ ├── NUnitTestFixtureBuilder.cs
│ │ │ ├── PairwiseStrategy.cs
│ │ │ ├── ParameterDataProvider.cs
│ │ │ ├── ProviderCache.cs
│ │ │ └── SequentialStrategy.cs
│ │ ├── Commands
│ │ │ ├── ApplyChangesToContextCommand.cs
│ │ │ ├── CommandDecoratorList.cs
│ │ │ ├── CommandStage.cs
│ │ │ ├── DelegatingTestCommand.cs
│ │ │ ├── ExpectedExceptionCommand.cs
│ │ │ ├── ICommandDecorator.cs
│ │ │ ├── MaxTimeCommand.cs
│ │ │ ├── OneTimeSetUpCommand.cs
│ │ │ ├── OneTimeTearDownCommand.cs
│ │ │ ├── RepeatedTestCommand.cs
│ │ │ ├── SetUpTearDownCommand.cs
│ │ │ ├── SkipCommand.cs
│ │ │ ├── TestCommand.cs
│ │ │ ├── TestMethodCommand.cs
│ │ │ └── TheoryResultCommand.cs
│ │ ├── CultureDetector.cs
│ │ ├── ExceptionHelper.cs
│ │ ├── Extensibility
│ │ │ ├── ParameterDataProviders.cs
│ │ │ └── TestCaseProviders.cs
│ │ ├── Filters
│ │ │ ├── AndFilter.cs
│ │ │ ├── CategoryExpression.cs
│ │ │ ├── CategoryFilter.cs
│ │ │ ├── NotFilter.cs
│ │ │ ├── OrFilter.cs
│ │ │ ├── SimpleCategoryExpression.cs
│ │ │ └── SimpleNameFilter.cs
│ │ ├── IApplyToContext.cs
│ │ ├── IApplyToTest.cs
│ │ ├── InvalidTestFixtureException.cs
│ │ ├── MethodHelper.cs
│ │ ├── NUnitException.cs
│ │ ├── NUnitLiteTestAssemblyBuilder.cs
│ │ ├── NUnitLiteTestAssemblyRunner.cs
│ │ ├── OSPlatform.cs
│ │ ├── ParameterSet.cs
│ │ ├── PlatformHelper.cs
│ │ ├── PropertyBag.cs
│ │ ├── PropertyNames.cs
│ │ ├── RandomGenerator.cs
│ │ ├── Randomizer.cs
│ │ ├── Reflect.cs
│ │ ├── Results
│ │ │ ├── TestCaseResult.cs
│ │ │ ├── TestResult.cs
│ │ │ └── TestSuiteResult.cs
│ │ ├── RuntimeFramework.cs
│ │ ├── StackFilter.cs
│ │ ├── StringUtil.cs
│ │ ├── TestExecutionContext.cs
│ │ ├── TestFilter.cs
│ │ ├── TestFixtureBuilder.cs
│ │ ├── TestListener.cs
│ │ ├── Tests
│ │ │ ├── ParameterizedFixtureSuite.cs
│ │ │ ├── ParameterizedMethodSuite.cs
│ │ │ ├── Test.cs
│ │ │ ├── TestAssembly.cs
│ │ │ ├── TestFixture.cs
│ │ │ ├── TestMethod.cs
│ │ │ └── TestSuite.cs
│ │ ├── TextMessageWriter.cs
│ │ ├── ThreadUtility.cs
│ │ ├── TypeHelper.cs
│ │ └── WorkItems
│ │ │ ├── CompositeWorkItem.cs
│ │ │ ├── CountdownEvent.cs
│ │ │ ├── SimpleWorkItem.cs
│ │ │ ├── WorkItem.cs
│ │ │ └── WorkItemState.cs
│ ├── Is.cs
│ ├── Iz.cs
│ ├── ListMapper.cs
│ ├── MessageMatch.cs
│ ├── ObjectList.cs
│ ├── Runner
│ │ ├── CommandLineOptions.cs
│ │ ├── ConsoleWriter.cs
│ │ ├── DebugWriter.cs
│ │ ├── OutputWriters
│ │ │ ├── NUnit2XmlOutputWriter.cs
│ │ │ ├── NUnit3XmlOutputWriter.cs
│ │ │ └── OutputWriter.cs
│ │ ├── ResultReporter.cs
│ │ ├── ResultSummary.cs
│ │ ├── Silverlight
│ │ │ ├── TestPage.g.cs
│ │ │ ├── TestPage.xaml.cs
│ │ │ └── TextBlockWriter.cs
│ │ └── TcpWriter.cs
│ ├── SpecialValue.cs
│ ├── TestCaseData.cs
│ ├── TestContext.cs
│ ├── Throws.cs
│ ├── guiunit.snk
│ ├── nunitlite-2.0.csproj
│ ├── nunitlite-3.5.csproj
│ ├── nunitlite-4.0.csproj
│ ├── nunitlite-4.5.csproj
│ ├── nunitlite-netcf-2.0.csproj
│ ├── nunitlite-netcf-3.5.csproj
│ ├── nunitlite-sl-3.0.csproj
│ ├── nunitlite-sl-4.0.csproj
│ ├── nunitlite-sl-5.0.csproj
│ ├── nunitlite.framework.build
│ └── obj
│ │ ├── Debug
│ │ ├── net-4.5
│ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ ├── sl-3.0
│ │ │ ├── Runner
│ │ │ │ └── Silverlight
│ │ │ │ │ └── TestPage.g.cs
│ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ ├── sl-4.0
│ │ │ └── Runner
│ │ │ │ └── Silverlight
│ │ │ │ ├── TestPage.g.cs
│ │ │ │ └── TestPage.g.i.cs
│ │ └── sl-5.0
│ │ │ ├── Runner
│ │ │ └── Silverlight
│ │ │ │ ├── TestPage.g.cs
│ │ │ │ └── TestPage.g.i.cs
│ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ └── release
│ │ ├── sl-3.0
│ │ ├── Runner
│ │ │ └── Silverlight
│ │ │ │ └── TestPage.g.cs
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ ├── sl-4.0
│ │ └── Runner
│ │ │ └── Silverlight
│ │ │ └── TestPage.g.cs
│ │ └── sl-5.0
│ │ ├── Runner
│ │ └── Silverlight
│ │ │ └── TestPage.g.cs
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
├── mock-assembly
│ ├── MockAssembly.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── mock-assembly-2.0.csproj
│ ├── mock-assembly-3.5.csproj
│ ├── mock-assembly-4.0.csproj
│ ├── mock-assembly-4.5.csproj
│ ├── mock-assembly-netcf-2.0.csproj
│ ├── mock-assembly-netcf-3.5.csproj
│ ├── mock-assembly-sl-3.0.csproj
│ ├── mock-assembly-sl-4.0.csproj
│ ├── mock-assembly-sl-5.0.csproj
│ ├── mock-assembly.build
│ └── obj
│ │ ├── Debug
│ │ ├── net-4.5
│ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ ├── sl-3.0
│ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ └── sl-5.0
│ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ └── release
│ │ ├── sl-3.0
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ └── sl-5.0
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
├── testdata
│ ├── AssemblyInfo.cs
│ ├── AssertCountFixture.cs
│ ├── AssertFailFixture.cs
│ ├── AssertIgnoreData.cs
│ ├── AsyncDummyFixture.cs
│ ├── AsyncRealFixture.cs
│ ├── AttributeInheritanceData.cs
│ ├── CategoryAttributeData.cs
│ ├── CultureAttributeData.cs
│ ├── DatapointFixture.cs
│ ├── DescriptionFixture.cs
│ ├── ExpectedExceptionData.cs
│ ├── FixtureSetUpTearDownData.cs
│ ├── MaxTimeFixture.cs
│ ├── ParameterizedTestFixture.cs
│ ├── PropertyAttributeTests.cs
│ ├── RepeatedTestFixture.cs
│ ├── SetUpData.cs
│ ├── TestCaseAttributeFixture.cs
│ ├── TestCaseSourceAttributeFixture.cs
│ ├── TestContextData.cs
│ ├── TestFixtureData.cs
│ ├── TestMethodSignatureFixture.cs
│ ├── TheoryFixture.cs
│ ├── TimeoutFixture.cs
│ ├── nunitlite.testdata-2.0.csproj
│ ├── nunitlite.testdata-3.5.csproj
│ ├── nunitlite.testdata-4.0.csproj
│ ├── nunitlite.testdata-4.5.csproj
│ ├── nunitlite.testdata-netcf-2.0.csproj
│ ├── nunitlite.testdata-netcf-3.5.csproj
│ ├── nunitlite.testdata-sl-3.0.csproj
│ ├── nunitlite.testdata-sl-4.0.csproj
│ ├── nunitlite.testdata-sl-5.0.csproj
│ ├── nunitlite.testdata.build
│ └── obj
│ │ ├── Debug
│ │ ├── net-4.5
│ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ ├── sl-3.0
│ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ └── sl-5.0
│ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ └── release
│ │ ├── sl-3.0
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ └── sl-5.0
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
└── tests
│ ├── Api
│ └── ResultStateTests.cs
│ ├── App.g.cs
│ ├── App.xaml.cs
│ ├── AssemblyInfo.cs
│ ├── Assertions
│ ├── ArrayEqualsFailureMessageFixture.cs
│ ├── ArrayEqualsFixture.cs
│ ├── ArrayNotEqualFixture.cs
│ ├── AssertFailTests.cs
│ ├── AssertIgnoreTests.cs
│ ├── AssertInconclusiveTests.cs
│ ├── AssertPassTests.cs
│ ├── AssertThatTests.cs
│ ├── AssertThrowsTests.cs
│ ├── AssumeThatTests.cs
│ ├── AsyncThrowsTests.cs
│ ├── CollectionTests.cs
│ ├── ConditionAssertTests.cs
│ ├── EqualsFixture.cs
│ ├── MessageChecker.cs
│ ├── NotEqualFixture.cs
│ ├── NotSameFixture.cs
│ ├── NullableTypesTests.cs
│ └── SameFixture.cs
│ ├── Attributes
│ ├── ApplyToTestTests.cs
│ ├── AttributeInheritanceTests.cs
│ ├── CategoryAttributeTests.cs
│ ├── CombinatorialTests.cs
│ ├── DatapointTests.cs
│ ├── DescriptionTests.cs
│ ├── ExpectedExceptionTests.cs
│ ├── FixtureSetUpTearDownTests.cs
│ ├── MaxTimeTests.cs
│ ├── PairwiseTests.cs
│ ├── ParameterizedTestFixtureTests.cs
│ ├── PropertyAttributeTests.cs
│ ├── RepeatedTestTests.cs
│ ├── SetCultureAttributeTests.cs
│ ├── TestCaseAttributeTests.cs
│ ├── TestCaseSourceTests.cs
│ ├── TestDummy.cs
│ ├── TestFixtureAttributeTests.cs
│ ├── TheoryTests.cs
│ ├── TimeoutTests.cs
│ ├── ValueSourceTests.cs
│ └── ValuesAttributeTests.cs
│ ├── Constraints
│ ├── AllItemsConstraintTests.cs
│ ├── AndConstraintTests.cs
│ ├── AssignableFromConstraintTests.cs
│ ├── AssignableToConstraintTests.cs
│ ├── AsyncDelayedConstraintTests.cs
│ ├── AttributeExistsConstraintTests.cs
│ ├── BasicConstraintTests.cs
│ ├── BinarySerializableTest.cs
│ ├── CollectionContainsConstraintTests.cs
│ ├── CollectionEquivalentConstraintTests.cs
│ ├── CollectionOrderedConstraintTests.cs
│ ├── CollectionSubsetConstraintTests.cs
│ ├── ComparisonConstraintTest.cs
│ ├── ConstraintTestBase.cs
│ ├── DelayedConstraintTest.cs
│ ├── EmptyConstraintTest.cs
│ ├── EndsWithConstraintTests.cs
│ ├── EqualConstraintTests.cs
│ ├── ExactCountConstraintTests.cs
│ ├── ExactTypeConstraintTests.cs
│ ├── FloatingPointNumericsTest.cs
│ ├── GreaterThanConstraintTests.cs
│ ├── GreaterThanOrEqualConstraintTests.cs
│ ├── InstanceOfTypeConstraintTests.cs
│ ├── LessThanConstraintTests.cs
│ ├── LessThanOrEqualConstraintTests.cs
│ ├── MessageWriterTests.cs
│ ├── MsgUtilTests.cs
│ ├── NUnitComparerTests.cs
│ ├── NUnitEqualityComparerTests.cs
│ ├── NotConstraintTests.cs
│ ├── NumericsTest.cs
│ ├── OrConstraintTests.cs
│ ├── PathConstraintTests.cs
│ ├── PredicateConstraintTests.cs
│ ├── PropertyTests.cs
│ ├── RangeConstraintTests.cs
│ ├── RangeTests.cs
│ ├── ReusableConstraintTests.cs
│ ├── SameAsTest.cs
│ ├── StartsWithConstraintTests.cs
│ ├── SubstringConstraintTests.cs
│ ├── TestDelegates.cs
│ ├── ThrowsConstraintTests.cs
│ ├── ToStringTests.cs
│ ├── UniqueItemsConstraintTests.cs
│ └── XmlSerializableTest.cs
│ ├── Framework
│ ├── StackFilterTest.cs
│ ├── SyntaxTests.cs
│ ├── TestContextTests.cs
│ └── TestResultTests.cs
│ ├── Internal
│ ├── AssemblyHelperTests.cs
│ ├── AsyncTestMethodTests.cs
│ ├── CultureSettingAndDetectionTests.cs
│ ├── DeduceTypeArgsFromArgs.cs
│ ├── GenericTestFixtureTests.cs
│ ├── GenericTestMethodTests.cs
│ ├── NUnitTestCaseBuilderTests.cs
│ ├── PlatformDetectionTests.cs
│ ├── PropertyBagTests.cs
│ ├── RandomGeneratorTests.cs
│ ├── RandomizerTests.cs
│ ├── RuntimeFrameworkTests.cs
│ ├── SetUpTest.cs
│ ├── SimpleGenericMethods.cs
│ ├── TestExecutionContextTests.cs
│ ├── TestFixtureTests.cs
│ ├── TestMethodSignatureTests.cs
│ ├── TestResultTests.cs
│ ├── TestXmlTests.cs
│ ├── TextMessageWriterTests.cs
│ └── TypeParameterUsedWithTestMethod.cs
│ ├── Program.cs
│ ├── RecordingTestListener.cs
│ ├── Runner
│ ├── CommandLineOptionTests.cs
│ └── NUnit2XmlOutputWriterTests.cs
│ ├── Syntax
│ ├── AfterTests.cs
│ ├── ArbitraryConstraintMatching.cs
│ ├── CollectionTests.cs
│ ├── ComparisonTests.cs
│ ├── EqualityTests.cs
│ ├── InvalidCodeTests.cs
│ ├── OperatorOverrides.cs
│ ├── OperatorTests.cs
│ ├── PathConstraintTests.cs
│ ├── PropertyTests.cs
│ ├── SerializableConstraints.cs
│ ├── SimpleConstraints.cs
│ ├── StringConstraints.cs
│ ├── SyntaxTest.cs
│ ├── TestCompiler.cs
│ ├── ThrowsTests.cs
│ └── TypeConstraints.cs
│ ├── TestUtilities
│ ├── Collections
│ │ ├── SimpleObjectCollection.cs
│ │ └── SimpleObjectList.cs
│ ├── Comparers
│ │ ├── AlwaysEqualComparer.cs
│ │ ├── SimpleEqualityComparer.cs
│ │ └── SimpleObjectComparer.cs
│ ├── ResultSummary.cs
│ ├── TestAssert.cs
│ ├── TestBuilder.cs
│ ├── TestComparer.cs
│ ├── TestDelegates.cs
│ └── TestFinder.cs
│ ├── nunitlite.tests-2.0.csproj
│ ├── nunitlite.tests-3.5.csproj
│ ├── nunitlite.tests-4.0.csproj
│ ├── nunitlite.tests-4.5.csproj
│ ├── nunitlite.tests-netcf-2.0.csproj
│ ├── nunitlite.tests-netcf-3.5.csproj
│ ├── nunitlite.tests-sl-3.0.csproj
│ ├── nunitlite.tests-sl-4.0.csproj
│ ├── nunitlite.tests-sl-5.0.csproj
│ ├── nunitlite.tests.build
│ └── obj
│ ├── Debug
│ ├── net-4.5
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ ├── sl-3.0
│ │ ├── App.g.cs
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ ├── sl-4.0
│ │ ├── App.g.cs
│ │ └── App.g.i.cs
│ └── sl-5.0
│ │ ├── App.g.cs
│ │ ├── App.g.i.cs
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ └── release
│ ├── sl-3.0
│ ├── App.g.cs
│ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ ├── sl-4.0
│ └── App.g.cs
│ └── sl-5.0
│ ├── App.g.cs
│ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
└── tools
└── nant
├── COPYING.txt
├── README.txt
└── bin
├── NAnt.CompressionTasks.dll
├── NAnt.CompressionTasks.xml
├── NAnt.Core.dll
├── NAnt.Core.xml
├── NAnt.DotNetTasks.dll
├── NAnt.DotNetTasks.xml
├── NAnt.MSNetTasks.dll
├── NAnt.MSNetTasks.xml
├── NAnt.NUnit.dll
├── NAnt.NUnit.xml
├── NAnt.NUnit1Tasks.dll
├── NAnt.NUnit1Tasks.xml
├── NAnt.NUnit2Tasks.dll
├── NAnt.NUnit2Tasks.xml
├── NAnt.SourceControlTasks.dll
├── NAnt.SourceControlTasks.xml
├── NAnt.VSNetTasks.dll
├── NAnt.VSNetTasks.xml
├── NAnt.VisualCppTasks.dll
├── NAnt.VisualCppTasks.xml
├── NAnt.Win32Tasks.dll
├── NAnt.Win32Tasks.xml
├── NAnt.exe
├── NAnt.exe.config
├── NAnt.xml
├── NDoc.Documenter.NAnt.dll
├── NDoc.Documenter.NAnt.xml
├── extensions
└── common
│ ├── 2.0
│ ├── NAnt.MSBuild.dll
│ └── NAnt.MSBuild.xml
│ └── 4.0
│ ├── NAnt.MSBuild.dll
│ └── NAnt.MSBuild.xml
├── lib
└── common
│ ├── 2.0
│ ├── nunit-console-runner.dll
│ ├── nunit-console.exe
│ ├── nunit-console.exe.config
│ ├── nunit.core.dll
│ ├── nunit.core.interfaces.dll
│ ├── nunit.framework.dll
│ └── nunit.util.dll
│ └── neutral
│ ├── ICSharpCode.SharpCvsLib.Console.dll
│ ├── ICSharpCode.SharpCvsLib.dll
│ ├── ICSharpCode.SharpZipLib.dll
│ ├── NDoc.Core.dll
│ ├── NDoc.Documenter.Msdn.dll
│ ├── NDoc.ExtendedUI.dll
│ ├── NUnitCore.dll
│ └── netDumbster.dll
├── log4net.dll
└── scvs.exe
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | bin
3 | obj
4 | src/framework/GuiUnit.userprefs
5 | *.userprefs
6 | *.csproj.CoreCompileInputs.cache
7 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2004-2013 Charlie Poole
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
21 |
--------------------------------------------------------------------------------
/README.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/guiunit/9167376c05961733f7cf7fca66ff4c8dac871f1c/README.txt
--------------------------------------------------------------------------------
/nant.bat:
--------------------------------------------------------------------------------
1 | tools\nant\bin\nant.exe %*
2 |
3 |
--------------------------------------------------------------------------------
/src/TestResultConsole/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("TestResultConsole.cs")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("TestResultConsole.cs")]
13 | [assembly: AssemblyCopyright("Copyright © 2007")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("0245d9d3-40c9-47f0-a109-31131cc0ea53")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | [assembly: AssemblyVersion("1.0.0.0")]
33 | [assembly: AssemblyFileVersion("1.0.0.0")]
34 |
--------------------------------------------------------------------------------
/src/TestResultConsole/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Net.Sockets;
4 | using System.Text;
5 |
6 | namespace TestResultConsole.cs
7 | {
8 | class Program
9 | {
10 | static int port = 9000;
11 |
12 | static void Main(string[] args)
13 | {
14 | TcpListener listener = new TcpListener(port);
15 |
16 | listener.Start();
17 | Console.WriteLine("Waiting for test to begin...");
18 | TcpClient client = listener.AcceptTcpClient();
19 |
20 | Console.WriteLine("Connected to test runner...");
21 | Console.WriteLine();
22 |
23 | NetworkStream ns = client.GetStream();
24 | TextReader rdr = new StreamReader(ns);
25 |
26 | try
27 | {
28 | while (client.Connected)
29 | {
30 | string data = rdr.ReadLine();
31 | Console.WriteLine(data);
32 | }
33 | }
34 | catch (IOException e)
35 | {
36 | if (client.Connected)
37 | Console.WriteLine(e.ToString());
38 | }
39 | catch (Exception e)
40 | {
41 | Console.WriteLine(e.ToString());
42 | }
43 |
44 | client.Close();
45 | listener.Stop();
46 | }
47 | }
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/src/framework/Api/FailureSite.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2012 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Api
25 | {
26 | ///
27 | /// The FailureSite enum indicates the stage of a test
28 | /// in which an error or failure occured.
29 | ///
30 | public enum FailureSite
31 | {
32 | ///
33 | /// Failure in the test itself
34 | ///
35 | Test,
36 |
37 | ///
38 | /// Failure in the SetUp method
39 | ///
40 | SetUp,
41 |
42 | ///
43 | /// Failure in the TearDown method
44 | ///
45 | TearDown,
46 |
47 | ///
48 | /// Failure of a parent test
49 | ///
50 | Parent,
51 |
52 | ///
53 | /// Failure of a child test
54 | ///
55 | Child
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/framework/Api/IParameterDataSource.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | using System;
25 | using System.Collections;
26 | using System.Reflection;
27 |
28 | namespace NUnit.Framework.Api
29 | {
30 | ///
31 | /// The IParameterDataSource interface is implemented by types
32 | /// that can provide data for a test method parameter.
33 | ///
34 | public interface IParameterDataSource
35 | {
36 | ///
37 | /// Gets an enumeration of data items for use as arguments
38 | /// for a test method parameter.
39 | ///
40 | /// The parameter for which data is needed
41 | /// An enumeration containing individual data items
42 | IEnumerable GetData(ParameterInfo parameter);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/framework/Api/ITestFilter.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2007 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | using System;
25 |
26 | namespace NUnit.Framework.Api
27 | {
28 | ///
29 | /// Interface to be implemented by filters applied to tests.
30 | /// The filter applies when running the test, after it has been
31 | /// loaded, since this is the only time an ITest exists.
32 | ///
33 | public interface ITestFilter
34 | {
35 | ///
36 | /// Indicates whether this is the EmptyFilter
37 | ///
38 | bool IsEmpty { get; }
39 |
40 | ///
41 | /// Determine if a particular test passes the filter criteria. Pass
42 | /// may examine the parents and/or descendants of a test, depending
43 | /// on the semantics of the particular filter
44 | ///
45 | /// The test to which the filter is applied
46 | /// True if the test passes the fFilter, otherwise false
47 | bool Pass( ITest test );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/framework/Api/IXmlNodeBuilder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NUnit.Framework.Api
4 | {
5 | ///
6 | /// An object implementing IXmlNodeBuilder is able to build
7 | /// an XmlResult representation of itself and any children.
8 | /// Note that the interface refers to the implementation
9 | /// of XmlNode in the NUnit.Framework.Api namespace.
10 | ///
11 | public interface IXmlNodeBuilder
12 | {
13 | ///
14 | /// Returns an XmlNode representating the current object.
15 | ///
16 | /// If true, children are included where applicable
17 | /// An XmlNode representing the result
18 | XmlNode ToXml(bool recursive);
19 |
20 | ///
21 | /// Returns an XmlNode representing the current object after
22 | /// adding it as a child of the supplied parent node.
23 | ///
24 | /// The parent node.
25 | /// If true, children are included, where applicable
26 | ///
27 | XmlNode AddToXml(XmlNode parentNode, bool recursive);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/framework/Api/TestStatus.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2010 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Api
25 | {
26 | ///
27 | /// The TestStatus enum indicates the result of running a test
28 | ///
29 | public enum TestStatus
30 | {
31 | ///
32 | /// The test was inconclusive
33 | ///
34 | Inconclusive,
35 |
36 | ///
37 | /// The test has skipped
38 | ///
39 | Skipped,
40 |
41 | ///
42 | /// The test succeeded
43 | ///
44 | Passed,
45 |
46 | ///
47 | /// The test failed
48 | ///
49 | Failed
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/framework/Attributes/CombinatorialAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | using System;
25 | using NUnit.Framework.Internal;
26 |
27 | namespace NUnit.Framework
28 | {
29 | ///
30 | /// Marks a test to use a combinatorial join of any argument
31 | /// data provided. Since this is the default, the attribute is
32 | /// not needed.
33 | ///
34 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited=false)]
35 | public class CombinatorialAttribute : PropertyAttribute
36 | {
37 | ///
38 | /// Default constructor
39 | ///
40 | public CombinatorialAttribute() : base(PropertyNames.JoinType, "Combinatorial") { }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/framework/Attributes/DataAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2010 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | using System;
25 |
26 | namespace NUnit.Framework
27 | {
28 | ///
29 | /// The abstract base class for all data-providing attributes
30 | /// defined by NUnit. Used to select all data sources for a
31 | /// method, class or parameter.
32 | ///
33 | public abstract class DataAttribute : NUnitAttribute
34 | {
35 | ///
36 | /// Default constructor
37 | ///
38 | public DataAttribute() { }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/framework/Attributes/DatapointAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2009 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | using System;
25 |
26 | namespace NUnit.Framework
27 | {
28 | ///
29 | /// Used to mark a field for use as a datapoint when executing a theory
30 | /// within the same fixture that requires an argument of the field's Type.
31 | ///
32 | [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
33 | public class DatapointAttribute : NUnitAttribute
34 | {
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/framework/Attributes/DatapointSourceAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2009 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | using System;
25 |
26 | namespace NUnit.Framework
27 | {
28 | ///
29 | /// Used to mark a field, property or method providing a set of datapoints to
30 | /// be used in executing any theories within the same fixture that require an
31 | /// argument of the Type provided. The data source may provide an array of
32 | /// the required Type or an IEnumerable<T>.
33 | /// Synonymous with DatapointsAttribute.
34 | ///
35 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
36 | public class DatapointSourceAttribute : NUnitAttribute
37 | {
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/framework/Attributes/DatapointsAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2009 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | using System;
25 |
26 | namespace NUnit.Framework
27 | {
28 | ///
29 | /// Used to mark a field, property or method providing a set of datapoints to
30 | /// be used in executing any theories within the same fixture that require an
31 | /// argument of the Type provided. The data source may provide an array of
32 | /// the required Type or an IEnumerable<T>.
33 | /// Synonymous with DatapointSourceAttribute.
34 | ///
35 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
36 | public class DatapointsAttribute : DatapointSourceAttribute
37 | {
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/framework/Attributes/DescriptionAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2007 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | using System;
25 | using NUnit.Framework.Internal;
26 |
27 | namespace NUnit.Framework
28 | {
29 | ///
30 | /// Attribute used to provide descriptive text about a
31 | /// test case or fixture.
32 | ///
33 | [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = false, Inherited=false)]
34 | public sealed class DescriptionAttribute : PropertyAttribute
35 | {
36 | ///
37 | /// Construct a description Attribute
38 | ///
39 | /// The text of the description
40 | public DescriptionAttribute(string description) : base(PropertyNames.Description, description) { }
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/src/framework/Attributes/NUnitAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2010 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | using System;
25 |
26 | namespace NUnit.Framework
27 | {
28 | ///
29 | /// The abstract base class for all custom attributes defined by NUnit.
30 | ///
31 | public abstract class NUnitAttribute : Attribute
32 | {
33 | ///
34 | /// Default constructor
35 | ///
36 | public NUnitAttribute() { }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/framework/Attributes/PairwiseAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | using System;
25 | using NUnit.Framework.Internal;
26 |
27 | namespace NUnit.Framework
28 | {
29 | ///
30 | /// Marks a test to use a pairwise join of any argument
31 | /// data provided. Arguments will be combined in such a
32 | /// way that all possible pairs of arguments are used.
33 | ///
34 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited=false)]
35 | public class PairwiseAttribute : PropertyAttribute
36 | {
37 | ///
38 | /// Default constructor
39 | ///
40 | public PairwiseAttribute() : base(PropertyNames.JoinType, "Pairwise") { }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/framework/Attributes/SequentialAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | using System;
25 | using NUnit.Framework.Internal;
26 |
27 | namespace NUnit.Framework
28 | {
29 | ///
30 | /// Marks a test to use a Sequential join of any argument
31 | /// data provided. Arguments will be combined into test cases,
32 | /// taking the next value of each argument until all are used.
33 | ///
34 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited=false)]
35 | public class SequentialAttribute : PropertyAttribute
36 | {
37 | ///
38 | /// Default constructor
39 | ///
40 | public SequentialAttribute() : base(PropertyNames.JoinType, "Sequential") { }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/framework/Attributes/TearDownAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2009 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework
25 | {
26 | using System;
27 |
28 | ///
29 | /// Attribute used to identify a method that is called
30 | /// immediately after each test is run. The method is
31 | /// guaranteed to be called, even if an exception is thrown.
32 | ///
33 | [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
34 | public class TearDownAttribute : NUnitAttribute
35 | {}
36 | }
37 |
--------------------------------------------------------------------------------
/src/framework/Attributes/TestFixtureSetUpAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2009 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework
25 | {
26 | using System;
27 |
28 | ///
29 | /// Attribute used to identify a method that is
30 | /// called before any tests in a fixture are run.
31 | ///
32 | [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
33 | public class TestFixtureSetUpAttribute : NUnitAttribute
34 | {
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/framework/Attributes/TestFixtureTearDownAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2009 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework
25 | {
26 | using System;
27 |
28 | ///
29 | /// Attribute used to identify a method that is called after
30 | /// all the tests in a fixture have run. The method is
31 | /// guaranteed to be called, even if an exception is thrown.
32 | ///
33 | [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
34 | public class TestFixtureTearDownAttribute : NUnitAttribute
35 | {
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/framework/Compatibility/SerializableAttribute.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2012 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | #if NETCF_1_0 || SILVERLIGHT
25 | namespace System
26 | {
27 | ///
28 | /// Replacement for the SerializableAttribute so we compile
29 | /// under Silverlight.
30 | ///
31 | public class SerializableAttribute : Attribute
32 | {
33 | }
34 | }
35 | #endif
36 |
--------------------------------------------------------------------------------
/src/framework/Constraints/FalseConstraint.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// FalseConstraint tests that the actual value is false
28 | ///
29 | public class FalseConstraint : BasicConstraint
30 | {
31 | ///
32 | /// Initializes a new instance of the class.
33 | ///
34 | public FalseConstraint() : base(false, "False") { }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/framework/Constraints/IResolveConstraint.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// The IConstraintExpression interface is implemented by all
28 | /// complete and resolvable constraints and expressions.
29 | ///
30 | public interface IResolveConstraint
31 | {
32 | ///
33 | /// Return the top-level constraint for this expression
34 | ///
35 | ///
36 | Constraint Resolve();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/framework/Constraints/NullConstraint.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// NullConstraint tests that the actual value is null
28 | ///
29 | public class NullConstraint : BasicConstraint
30 | {
31 | ///
32 | /// Initializes a new instance of the class.
33 | ///
34 | public NullConstraint() : base(null, "null") { }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/framework/Constraints/Operators/AllOperator.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// Represents a constraint that succeeds if all the
28 | /// members of a collection match a base constraint.
29 | ///
30 | public class AllOperator : CollectionOperator
31 | {
32 | ///
33 | /// Returns a constraint that will apply the argument
34 | /// to the members of a collection, succeeding if
35 | /// they all succeed.
36 | ///
37 | public override Constraint ApplyPrefix(Constraint constraint)
38 | {
39 | return new AllItemsConstraint(constraint);
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/framework/Constraints/Operators/AndOperator.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// Operator that requires both it's arguments to succeed
28 | ///
29 | public class AndOperator : BinaryOperator
30 | {
31 | ///
32 | /// Construct an AndOperator
33 | ///
34 | public AndOperator()
35 | {
36 | this.left_precedence = this.right_precedence = 2;
37 | }
38 |
39 | ///
40 | /// Apply the operator to produce an AndConstraint
41 | ///
42 | public override Constraint ApplyOperator(Constraint left, Constraint right)
43 | {
44 | return new AndConstraint(left, right);
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/src/framework/Constraints/Operators/CollectionOperator.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// Abstract base for operators that indicate how to
28 | /// apply a constraint to items in a collection.
29 | ///
30 | public abstract class CollectionOperator : PrefixOperator
31 | {
32 | ///
33 | /// Constructs a CollectionOperator
34 | ///
35 | protected CollectionOperator()
36 | {
37 | // Collection Operators stack on everything
38 | // and allow all other ops to stack on them
39 | this.left_precedence = 1;
40 | this.right_precedence = 10;
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/src/framework/Constraints/Operators/NoneOperator.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// Represents a constraint that succeeds if none of the
28 | /// members of a collection match a base constraint.
29 | ///
30 | public class NoneOperator : CollectionOperator
31 | {
32 | ///
33 | /// Returns a constraint that will apply the argument
34 | /// to the members of a collection, succeeding if
35 | /// none of them succeed.
36 | ///
37 | public override Constraint ApplyPrefix(Constraint constraint)
38 | {
39 | return new NoItemConstraint(constraint);
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/framework/Constraints/Operators/NotOperator.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// Negates the test of the constraint it wraps.
28 | ///
29 | public class NotOperator : PrefixOperator
30 | {
31 | ///
32 | /// Constructs a new NotOperator
33 | ///
34 | public NotOperator()
35 | {
36 | // Not stacks on anything and only allows other
37 | // prefix ops to stack on top of it.
38 | this.left_precedence = this.right_precedence = 1;
39 | }
40 |
41 | ///
42 | /// Returns a NotConstraint applied to its argument.
43 | ///
44 | public override Constraint ApplyPrefix(Constraint constraint)
45 | {
46 | return new NotConstraint(constraint);
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/src/framework/Constraints/Operators/OrOperator.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// Operator that requires at least one of it's arguments to succeed
28 | ///
29 | public class OrOperator : BinaryOperator
30 | {
31 | ///
32 | /// Construct an OrOperator
33 | ///
34 | public OrOperator()
35 | {
36 | this.left_precedence = this.right_precedence = 3;
37 | }
38 |
39 | ///
40 | /// Apply the operator to produce an OrConstraint
41 | ///
42 | public override Constraint ApplyOperator(Constraint left, Constraint right)
43 | {
44 | return new OrConstraint(left, right);
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/src/framework/Constraints/Operators/SelfResolvingOperator.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// Abstract base class for operators that are able to reduce to a
28 | /// constraint whether or not another syntactic element follows.
29 | ///
30 | public abstract class SelfResolvingOperator : ConstraintOperator
31 | {
32 | }
33 | }
--------------------------------------------------------------------------------
/src/framework/Constraints/Operators/SomeOperator.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// Represents a constraint that succeeds if any of the
28 | /// members of a collection match a base constraint.
29 | ///
30 | public class SomeOperator : CollectionOperator
31 | {
32 | ///
33 | /// Returns a constraint that will apply the argument
34 | /// to the members of a collection, succeeding if
35 | /// any of them succeed.
36 | ///
37 | public override Constraint ApplyPrefix(Constraint constraint)
38 | {
39 | return new SomeItemsConstraint(constraint);
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/framework/Constraints/Operators/WithOperator.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// Represents a constraint that simply wraps the
28 | /// constraint provided as an argument, without any
29 | /// further functionality, but which modifes the
30 | /// order of evaluation because of its precedence.
31 | ///
32 | public class WithOperator : PrefixOperator
33 | {
34 | ///
35 | /// Constructor for the WithOperator
36 | ///
37 | public WithOperator()
38 | {
39 | this.left_precedence = 1;
40 | this.right_precedence = 4;
41 | }
42 |
43 | ///
44 | /// Returns a constraint that wraps its argument
45 | ///
46 | public override Constraint ApplyPrefix(Constraint constraint)
47 | {
48 | return constraint;
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/src/framework/Constraints/PrefixConstraint.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2007 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// Abstract base class used for prefixes
28 | ///
29 | public abstract class PrefixConstraint : Constraint
30 | {
31 | ///
32 | /// The base constraint
33 | ///
34 | protected Constraint baseConstraint;
35 |
36 | ///
37 | /// Construct given a base constraint
38 | ///
39 | ///
40 | protected PrefixConstraint(IResolveConstraint resolvable) : base(resolvable)
41 | {
42 | if (resolvable != null)
43 | this.baseConstraint = resolvable.Resolve();
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/src/framework/Constraints/TrueConstraint.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | namespace NUnit.Framework.Constraints
25 | {
26 | ///
27 | /// TrueConstraint tests that the actual value is true
28 | ///
29 | public class TrueConstraint : BasicConstraint
30 | {
31 | ///
32 | /// Initializes a new instance of the class.
33 | ///
34 | public TrueConstraint() : base(true, "True") { }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/framework/GlobalSettings.cs:
--------------------------------------------------------------------------------
1 | // ***********************************************************************
2 | // Copyright (c) 2008 Charlie Poole
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject to
10 | // the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | // ***********************************************************************
23 |
24 | using System;
25 |
26 | namespace NUnit.Framework
27 | {
28 | ///
29 | /// GlobalSettings is a place for setting default values used
30 | /// by the framework in performing asserts.
31 | ///
32 | public class GlobalSettings
33 | {
34 | ///
35 | /// Default tolerance for floating point equality
36 | ///
37 | public static double DefaultFloatingPointTolerance = 0.0d;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/framework/Guard.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NUnit.Framework
4 | {
5 | ///
6 | /// Class used to guard against unexpected argument values
7 | /// by throwing an appropriate exception.
8 | ///
9 | public class Guard
10 | {
11 | ///
12 | /// Throws an exception if an argument is null
13 | ///
14 | /// The value to be tested
15 | /// The name of the argument
16 | public static void ArgumentNotNull(object value, string name)
17 | {
18 | if (value == null)
19 | throw new ArgumentNullException("Argument " + name + " must not be null", name);
20 | }
21 |
22 | ///
23 | /// Throws an exception if a string argument is null or empty
24 | ///
25 | /// The value to be tested
26 | /// The name of the argument
27 | public static void ArgumentNotNullOrEmpty(string value, string name)
28 | {
29 | ArgumentNotNull(value, name);
30 |
31 | if (value == string.Empty)
32 | throw new ArgumentException("Argument " + name +" must not be the empty string", name);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/framework/GuiUnit.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuiUnit_NET_4_5", "GuiUnit_NET_4_5.csproj", "{D12F0F7B-8DE3-43EC-BA49-41052D065A9B}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuiUnit_NET_4_0", "GuiUnit_NET_4_0.csproj", "{E13A0A7B-4DE6-43ED-A139-41052D065A9B}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Release|Any CPU.Build.0 = Release|Any CPU
18 | {E13A0A7B-4DE6-43ED-A139-41052D065A9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {E13A0A7B-4DE6-43ED-A139-41052D065A9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {E13A0A7B-4DE6-43ED-A139-41052D065A9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {E13A0A7B-4DE6-43ED-A139-41052D065A9B}.Release|Any CPU.Build.0 = Release|Any CPU
22 | EndGlobalSection
23 | GlobalSection(MonoDevelopProperties) = preSolution
24 | StartupItem = GuiUnit_NET_4_5.csproj
25 | EndGlobalSection
26 | EndGlobal
27 |
--------------------------------------------------------------------------------
/src/framework/GuiUnit/IMainLoopIntegration.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace GuiUnit
4 | {
5 | public interface IMainLoopIntegration
6 | {
7 | void InitializeToolkit ();
8 | void InvokeOnMainLoop (InvokerHelper helper);
9 | void RunMainLoop ();
10 | void Shutdown (int exitCode);
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/src/framework/GuiUnit/InvokerHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using NUnit.Framework.Internal;
3 |
4 | namespace GuiUnit
5 | {
6 | public class InvokerHelper
7 | {
8 | internal object Result;
9 | internal Func