2
using NUnit.Framework.Api;
3
using NUnit.Framework.Internal;
4
using NUnit.TestData.DatapointFixture;
5
using NUnit.TestUtilities;
7
namespace NUnit.Framework.Attributes
9
public class DatapointTests
11
private void RunTestOnFixture(Type fixtureType)
13
TestResult result = TestBuilder.RunTestFixture(fixtureType);
14
ResultSummary summary = new ResultSummary(result);
15
Assert.That(summary.Passed, Is.EqualTo(2));
16
Assert.That(summary.Inconclusive, Is.EqualTo(3));
17
Assert.That(result.ResultState, Is.EqualTo(ResultState.Success));
21
public void WorksOnField()
23
RunTestOnFixture(typeof(SquareRootTest_Field_Double));
27
public void WorksOnArray()
29
RunTestOnFixture(typeof(SquareRootTest_Field_ArrayOfDouble));
33
public void WorksOnPropertyReturningArray()
35
RunTestOnFixture(typeof(SquareRootTest_Property_ArrayOfDouble));
39
public void WorksOnMethodReturningArray()
41
RunTestOnFixture(typeof(SquareRootTest_Method_ArrayOfDouble));
44
#if CLR_2_0 || CLR_4_0
46
public void WorksOnIEnumerableOfT()
48
RunTestOnFixture(typeof(SquareRootTest_Field_IEnumerableOfDouble));
52
public void WorksOnPropertyReturningIEnumerableOfT()
54
RunTestOnFixture(typeof(SquareRootTest_Property_IEnumerableOfDouble));
58
public void WorksOnMethodReturningIEnumerableOfT()
60
RunTestOnFixture(typeof(SquareRootTest_Method_IEnumerableOfDouble));
64
public void WorksOnEnumeratorReturningIEnumerableOfT()
66
RunTestOnFixture(typeof(SquareRootTest_Iterator_IEnumerableOfDouble));