~ubuntu-branches/ubuntu/utopic/monodevelop/utopic

« back to all changes in this revision

Viewing changes to external/guiunit/src/tests/Attributes/DatapointTests.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-10-10 14:50:04 UTC
  • mfrom: (10.3.4)
  • Revision ID: package-import@ubuntu.com-20131010145004-80l130sny21b17sb
Tags: 4.0.12+dfsg-1
* [5dcb6e1] Fix debian/watch for new source tarball name format
* [5c68cb5] Refresh list of files removed by get-orig-source to 
  reflect 4.0.12
* [96d60a0] Imported Upstream version 4.0.12+dfsg
* [b989752] Refresh debian/patches/no_appmenu to ensure it applies
* [2a4c351] Ensure every assembly in external/ is cleaned properly
* [92762f7] Add more excluded Mac-specific modulerefs
* [bc698ba] Add symlinks to NUnit assemblies (Closes: #714246)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
using System;
 
2
using NUnit.Framework.Api;
 
3
using NUnit.Framework.Internal;
 
4
using NUnit.TestData.DatapointFixture;
 
5
using NUnit.TestUtilities;
 
6
 
 
7
namespace NUnit.Framework.Attributes
 
8
{
 
9
    public class DatapointTests
 
10
    {
 
11
        private void RunTestOnFixture(Type fixtureType)
 
12
        {
 
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));
 
18
        }
 
19
 
 
20
        [Test]
 
21
        public void WorksOnField()
 
22
        {
 
23
            RunTestOnFixture(typeof(SquareRootTest_Field_Double));
 
24
        }
 
25
 
 
26
        [Test]
 
27
        public void WorksOnArray()
 
28
        {
 
29
            RunTestOnFixture(typeof(SquareRootTest_Field_ArrayOfDouble));
 
30
        }
 
31
 
 
32
        [Test]
 
33
        public void WorksOnPropertyReturningArray()
 
34
        {
 
35
            RunTestOnFixture(typeof(SquareRootTest_Property_ArrayOfDouble));
 
36
        }
 
37
 
 
38
        [Test]
 
39
        public void WorksOnMethodReturningArray()
 
40
        {
 
41
            RunTestOnFixture(typeof(SquareRootTest_Method_ArrayOfDouble));
 
42
        }
 
43
 
 
44
#if CLR_2_0 || CLR_4_0
 
45
        [Test]
 
46
        public void WorksOnIEnumerableOfT()
 
47
        {
 
48
            RunTestOnFixture(typeof(SquareRootTest_Field_IEnumerableOfDouble));
 
49
        }
 
50
 
 
51
        [Test]
 
52
        public void WorksOnPropertyReturningIEnumerableOfT()
 
53
        {
 
54
            RunTestOnFixture(typeof(SquareRootTest_Property_IEnumerableOfDouble));
 
55
        }
 
56
 
 
57
        [Test]
 
58
        public void WorksOnMethodReturningIEnumerableOfT()
 
59
        {
 
60
            RunTestOnFixture(typeof(SquareRootTest_Method_IEnumerableOfDouble));
 
61
        }
 
62
 
 
63
        [Test]
 
64
        public void WorksOnEnumeratorReturningIEnumerableOfT()
 
65
        {
 
66
            RunTestOnFixture(typeof(SquareRootTest_Iterator_IEnumerableOfDouble));
 
67
        }
 
68
#endif
 
69
    }
 
70
}