NUnit.Framework.Assert.That(NUnit.Framework.TestDelegate, NUnit.Framework.Constraints.IResolveConstraint)

Here are the examples of the csharp api class NUnit.Framework.Assert.That(NUnit.Framework.TestDelegate, NUnit.Framework.Constraints.IResolveConstraint) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

200 Examples 7

1. Example

Project: ContinuousTests
Source File: SpecFlowFeatureParser.cs
[Test]
        public void when_given_something_that_is_not_a_spec_it_will_return_null()
        {
            Assert.That(new SpecFlowFeatureParser("", null).GetTest(0), Is.Null);
        }

2. Example

Project: ContinuousTests
Source File: CategoryParseTests.cs
[Test]
		public void EmptyStringReturnsEmptyFilter()
		{
			CategoryExpression expr = new CategoryExpression( "" );
			Assert.That( expr.Filter.IsEmpty );
		}

3. Example

Project: ContinuousTests
Source File: ProjectConfigTests.cs
[Test]
        public void AddingInitialConfigRequiresReload()
        {
            NUnitProject newProj = new NUnitProject("/junk");
            newProj.HasChangesRequiringReload = false;
            newProj.Configs.Add("New");
            Assert.That(newProj.HasChangesRequiringReload);
        }

4. Example

Project: ContinuousTests
Source File: TestCodeFormatterCollection.cs
[Test]
        public void ContainsFormatterFromExtension()
        {
            Assert.That(_filled.HasExtension((string)null), Is.False);
        }

5. Example

Project: ContinuousTests
Source File: TestGeneralCodeFormatter.cs
[Test]
        public void Format()
        {
            Assert.That(_formatter.Format("test", "C#"), Is.Not.Null);
            Assert.That(_formatter.Format("test", "txt"), Is.Not.Null);

            return;
        }

6. Example

Project: ContinuousTests
Source File: TestCSCode.cs
[Test]
        public void Test_Equals()
        {
            _code = new TestingCSCode(
          /n ..... /n //View Source file for more details /n }

7. Example

Project: ContinuousTests
Source File: TestLexer.cs
[Test]
        public void Test_Default()
        {
            Assert.That(_lexer.CurrentToken, Is.Null);
            Assert.That(_lexer.HasNext(), Is.False);
            Assert.That(_lexer.Next(), Is.False);

            return;
        }

8. Example

Project: ContinuousTests
Source File: TestIErrorParser.cs
public RawError AcceptValue(IErrorParser parser, string error)
        {
            RawError res;

            res = new RawError(error);
            Assert.That(parser.TryParse(_stack, res), Is.True, "Failed to parse \"{0}\"", error);

            return (res);
        }

9. Example

Project: ContinuousTests
Source File: TestIErrorParser.cs
public void RejectValue(IErrorParser parser, string error)
        {
            Assert.That(parser.TryParse(_stack, new RawError(error)), Is.False);
        }

10. Example

Project: ContinuousTests
Source File: TestPathParser.cs
[SetUp]
        public new void SetUp()
        {
            _parser = new PathCompositeParser();

            Assert.That(_parser.UnixPathParser, Is.Not.Null);
            Assert.That(_parser.WindowsPathParser, Is.Not.Null);                

            return;
        }

11. Example

Project: ContinuousTests
Source File: TestUnixPathParser.cs
[SetUp]
        public new void SetUp()
        {
            _parser = new PathCompositeParser().UnixPathParser;

            Assert.That(_parser, Is.Not.Null);

            return;
        }

12. Example

Project: ContinuousTests
Source File: TestWindowsPathParser.cs
[SetUp]
        public new void SetUp()
        {
            _parser = new PathCompositeParser().WindowsPathParser;

            Assert.That(_parser, Is.Not.Null);

            return;                
        }

13. Example

Project: ContinuousTests
Source File: TestExceptionItem.cs
[Test]
        public void Test_Equals()
        {
            ErrorItem itemA;
            ErrorItem itemB;
            ErrorItem itemC;

            itemA = new ErrorItem("file1.txt", 43);
            itemB = new ErrorItem("file2.txt", 44);
            itemC = new ErrorItem("file1.txt", "myFunction()", 43);

            Assert.That(itemA.Equals(null), Is.False);
            Assert.That(itemA.Equals("hello"), Is.False);
            Assert.That(itemA.Equals(itemB), Is.False);
            Assert.That(itemA.Equals(itemC), Is.False);
            Assert.That(itemA.Equals(itemA), Is.True);
            Assert.That(itemA.Equals(new ErrorItem("file", 43)), Is.False);
            Assert.That(itemA.Equals(new ErrorItem("file1.txt", 42)), Is.False);
            Assert.That(itemA.Equals(new ErrorItem("file1.txt", 43)), Is.True);

            return;
        }

14. Example

Project: ContinuousTests
Source File: TestPaintLineLocation.cs
[Test]
        public void Test_Equals()
        {
            Assert.That(_line.Equals(null), Is.False);
            Assert.That(_line.Equals("hello"), Is.False);
            Assert.That(_line.Equals(new PaintLineLocation(0, "", new PointF(0, 0))), Is.False);

            Assert.That(
                _line.Equals(new PaintLineLocation(_line.LineIndex, _line.Text, new PointF(0, 0))),
                Is.False);
            Assert.That(
                _line.Equals(new PaintLineLocation(_line.LineIndex, "", _line.Location)),
                Is.False);
            Assert.That(
                _line.Equals(new PaintLineLocation(0, _line.Text, _line.Location)),
                Is.False);

            Assert.That(_line.Equals(_line), Is.True);
            Assert.That(_line.Equals(
                new PaintLineLocation(_line.LineIndex, _line.Text, _line.Location)),
                Is.True);

            return;
        }

15. Example

Project: ContinuousTests
Source File: AttributeInheritance.cs
[Test]
		public void InheritedFixtureAttributeIsRecognized()
		{
			Assert.That( builder.CanBuildFrom( typeof (TestData.When_collecting_test_fixtures) ) );
		}

16. Example

Project: ContinuousTests
Source File: RuntimeFrameworkTests.cs
[Test]
        public void CurrentFrameworkMustBeAvailable()
        {
            Assert.That(RuntimeFramework.CurrentFramework.IsAvailable);
        }

17. Example

Project: ContinuousTests
Source File: AssertionHelper.cs
public void Expect(ActualValueDelegate del, IResolveConstraint expr, string message, params object[] args)
        {
            Assert.That(del, expr, message, args);
        }

18. Example

Project: ContinuousTests
Source File: DirectoryAssert.cs
static public void IsEmpty(DirectoryInfo directory, string message, params object[] args)
        {
            Assert.That( directory, new EmptyDirectoryContraint(), message, args);
        }

19. Example

Project: ContinuousTests
Source File: AfterConstraintTests.cs
[Test]
        public void ThatOverload_ZeroDelayIsAllowed()
        {
            Assert.That(DelegateReturningZero, new DelayedConstraint(new EqualConstraint(0), 0));
        }

20. Example

Project: ContinuousTests
Source File: AfterConstraintTests.cs
[Test, ExpectedException(typeof(ArgumentException))]
        public void ThatOverload_DoesNotAcceptNegativeDelayValues()
        {
            Assert.That(DelegateReturningZero, new DelayedConstraint(new EqualConstraint(0), -1));
        }

21. Example

Project: ContinuousTests
Source File: CollectionConstraintTests.cs
[Test]
		public void CanTestContentsOfCollectionNotImplementingIList()
		{
			ICollectionAdapter ints = new ICollectionAdapter(new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9});           
			Assert.That(ints, new CollectionContainsConstraint( 9 ));
		}

22. Example

Project: ContinuousTests
Source File: ComparerTests.cs
[TestCase(double.PositiveInfinity)]
        [TestCase(double.NegativeInfinity)]
        [TestCase(double.NaN)]
        [TestCase(float.PositiveInfinity)]
        [TestCase(float.NegativeInfinity)]
        [TestCase(float.NaN)]
        public void SpecialFloatingPointValues(object x)
        {
            Assert.That(NUnitEqualityComparer.Default.ObjectsEqual(x, x));
        }

23. Example

Project: ContinuousTests
Source File: CategoryParseTests.cs
[Test]
		public void EmptyStringReturnsEmptyFilter()
		{
			CategoryExpression expr = new CategoryExpression( "" );
			Assert.That( expr.Filter.IsEmpty );
		}

24. Example

Project: ContinuousTests
Source File: ProjectConfigTests.cs
[Test]
        public void AddingInitialConfigRequiresReload()
        {
            NUnitProject newProj = new NUnitProject("/junk");
            newProj.HasChangesRequiringReload = false;
            newProj.Configs.Add("New");
            Assert.That(newProj.HasChangesRequiringReload);
        }

25. Example

Project: ContinuousTests
Source File: TestCodeFormatterCollection.cs
[Test]
        public void ContainsFormatterFromExtension()
        {
            Assert.That(_filled.HasExtension((string)null), Is.False);
        }

26. Example

Project: ContinuousTests
Source File: TestGeneralCodeFormatter.cs
[Test]
        public void Format()
        {
            Assert.That(_formatter.Format("test", "C#"), Is.Not.Null);
            Assert.That(_formatter.Format("test", "txt"), Is.Not.Null);

            return;
        }

27. Example

Project: ContinuousTests
Source File: TestCSCode.cs
[Test]
        public void Test_Equals()
        {
            _code = new TestingCSCode(
          /n ..... /n //View Source file for more details /n }

28. Example

Project: ContinuousTests
Source File: TestLexer.cs
[Test]
        public void Test_Default()
        {
            Assert.That(_lexer.CurrentToken, Is.Null);
            Assert.That(_lexer.HasNext(), Is.False);
            Assert.That(_lexer.Next(), Is.False);

            return;
        }

29. Example

Project: ContinuousTests
Source File: TestIErrorParser.cs
public RawError AcceptValue(IErrorParser parser, string error)
        {
            RawError res;

            res = new RawError(error);
            Assert.That(parser.TryParse(_stack, res), Is.True, "Failed to parse \"{0}\"", error);

            return (res);
        }

30. Example

Project: ContinuousTests
Source File: TestIErrorParser.cs
public void RejectValue(IErrorParser parser, string error)
        {
            Assert.That(parser.TryParse(_stack, new RawError(error)), Is.False);
        }

31. Example

Project: ContinuousTests
Source File: TestPathParser.cs
[SetUp]
        public new void SetUp()
        {
            _parser = new PathCompositeParser();

            Assert.That(_parser.UnixPathParser, Is.Not.Null);
            Assert.That(_parser.WindowsPathParser, Is.Not.Null);                

            return;
        }

32. Example

Project: ContinuousTests
Source File: TestUnixPathParser.cs
[SetUp]
        public new void SetUp()
        {
            _parser = new PathCompositeParser().UnixPathParser;

            Assert.That(_parser, Is.Not.Null);

            return;
        }

33. Example

Project: ContinuousTests
Source File: TestWindowsPathParser.cs
[SetUp]
        public new void SetUp()
        {
            _parser = new PathCompositeParser().WindowsPathParser;

            Assert.That(_parser, Is.Not.Null);

            return;                
        }

34. Example

Project: ContinuousTests
Source File: TestExceptionItem.cs
[Test]
        public void Test_Equals()
        {
            ErrorItem itemA;
            ErrorItem itemB;
            ErrorItem itemC;

            itemA = new ErrorItem("file1.txt", 43);
            itemB = new ErrorItem("file2.txt", 44);
            itemC = new ErrorItem("file1.txt", "myFunction()", 43);

            Assert.That(itemA.Equals(null), Is.False);
            Assert.That(itemA.Equals("hello"), Is.False);
            Assert.That(itemA.Equals(itemB), Is.False);
            Assert.That(itemA.Equals(itemC), Is.False);
            Assert.That(itemA.Equals(itemA), Is.True);
            Assert.That(itemA.Equals(new ErrorItem("file", 43)), Is.False);
            Assert.That(itemA.Equals(new ErrorItem("file1.txt", 42)), Is.False);
            Assert.That(itemA.Equals(new ErrorItem("file1.txt", 43)), Is.True);

            return;
        }

35. Example

Project: ContinuousTests
Source File: TestPaintLineLocation.cs
[Test]
        public void Test_Equals()
        {
            Assert.That(_line.Equals(null), Is.False);
            Assert.That(_line.Equals("hello"), Is.False);
            Assert.That(_line.Equals(new PaintLineLocation(0, "", new PointF(0, 0))), Is.False);

            Assert.That(
                _line.Equals(new PaintLineLocation(_line.LineIndex, _line.Text, new PointF(0, 0))),
                Is.False);
            Assert.That(
                _line.Equals(new PaintLineLocation(_line.LineIndex, "", _line.Location)),
                Is.False);
            Assert.That(
                _line.Equals(new PaintLineLocation(0, _line.Text, _line.Location)),
                Is.False);

            Assert.That(_line.Equals(_line), Is.True);
            Assert.That(_line.Equals(
                new PaintLineLocation(_line.LineIndex, _line.Text, _line.Location)),
                Is.True);

            return;
        }

36. Example

Project: ContinuousTests
Source File: AttributeInheritance.cs
[Test]
		public void InheritedFixtureAttributeIsRecognized()
		{
			Assert.That( builder.CanBuildFrom( typeof (TestData.When_collecting_test_fixtures) ) );
		}

37. Example

Project: ContinuousTests
Source File: RuntimeFrameworkTests.cs
[Test]
        public void CurrentFrameworkMustBeAvailable()
        {
            Assert.That(RuntimeFramework.CurrentFramework.IsAvailable);
        }

38. Example

Project: ContinuousTests
Source File: AssertionHelper.cs
public void Expect(ActualValueDelegate del, IResolveConstraint expr, string message, params object[] args)
        {
            Assert.That(del, expr, message, args);
        }

39. Example

Project: ContinuousTests
Source File: DirectoryAssert.cs
static public void IsEmpty(DirectoryInfo directory, string message, params object[] args)
        {
            Assert.That( directory, new EmptyDirectoryContraint(), message, args);
        }

40. Example

Project: ContinuousTests
Source File: AfterConstraintTests.cs
[Test]
        public void ThatOverload_ZeroDelayIsAllowed()
        {
            Assert.That(DelegateReturningZero, new DelayedConstraint(new EqualConstraint(0), 0));
        }

41. Example

Project: ContinuousTests
Source File: AfterConstraintTests.cs
[Test, ExpectedException(typeof(ArgumentException))]
        public void ThatOverload_DoesNotAcceptNegativeDelayValues()
        {
            Assert.That(DelegateReturningZero, new DelayedConstraint(new EqualConstraint(0), -1));
        }

42. Example

Project: ContinuousTests
Source File: CollectionConstraintTests.cs
[Test]
		public void CanTestContentsOfCollectionNotImplementingIList()
		{
			ICollectionAdapter ints = new ICollectionAdapter(new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9});           
			Assert.That(ints, new CollectionContainsConstraint( 9 ));
		}

43. Example

Project: ContinuousTests
Source File: CategoryParseTests.cs
[Test]
		public void EmptyStringReturnsEmptyFilter()
		{
			CategoryExpression expr = new CategoryExpression( "" );
			Assert.That( expr.Filter.IsEmpty );
		}

44. Example

Project: ContinuousTests
Source File: ProjectConfigTests.cs
[Test]
        public void AddingInitialConfigRequiresReload()
        {
            NUnitProject newProj = new NUnitProject("/junk");
            newProj.HasChangesRequiringReload = false;
            newProj.Configs.Add("New");
            Assert.That(newProj.HasChangesRequiringReload);
        }

45. Example

Project: ContinuousTests
Source File: TestCodeFormatterCollection.cs
[Test]
        public void ContainsFormatterFromExtension()
        {
            Assert.That(_filled.HasExtension((string)null), Is.False);
        }

46. Example

Project: ContinuousTests
Source File: TestGeneralCodeFormatter.cs
[Test]
        public void Format()
        {
            Assert.That(_formatter.Format("test", "C#"), Is.Not.Null);
            Assert.That(_formatter.Format("test", "txt"), Is.Not.Null);

            return;
        }

47. Example

Project: ContinuousTests
Source File: TestCSCode.cs
[Test]
        public void Test_Equals()
        {
            _code = new TestingCSCode(
          /n ..... /n //View Source file for more details /n }

48. Example

Project: ContinuousTests
Source File: TestLexer.cs
[Test]
        public void Test_Default()
        {
            Assert.That(_lexer.CurrentToken, Is.Null);
            Assert.That(_lexer.HasNext(), Is.False);
            Assert.That(_lexer.Next(), Is.False);

            return;
        }

49. Example

Project: ContinuousTests
Source File: TestIErrorParser.cs
public RawError AcceptValue(IErrorParser parser, string error)
        {
            RawError res;

            res = new RawError(error);
            Assert.That(parser.TryParse(_stack, res), Is.True, "Failed to parse \"{0}\"", error);

            return (res);
        }

50. Example

Project: ContinuousTests
Source File: TestIErrorParser.cs
public void RejectValue(IErrorParser parser, string error)
        {
            Assert.That(parser.TryParse(_stack, new RawError(error)), Is.False);
        }