NUnit.Framework.Assert.GreaterOrEqual(System.IComparable, System.IComparable, string)

Here are the examples of the csharp api class NUnit.Framework.Assert.GreaterOrEqual(System.IComparable, System.IComparable, string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

16 Examples 7

1. Example

View license
public static IComparable ShouldBeGreaterOrEqualThan(this IComparable arg1, IComparable arg2, string message = "")
    {
        Assert.GreaterOrEqual(arg1, arg2, message);
        return arg2;
    }

2. Example

Project: riak-dotnet-client
Source File: Extensions.cs
View license
public static void ShouldBeGreaterThan(this long? actual, long? expected, string message = null)
        {
            Assert.GreaterOrEqual(actual, expected, message);
        }

3. Example

Project: NsqSharp
Source File: TickerTest.cs
View license
[Test]
        public void TestDoubleTicker()
        {
            // arrange
            var start = DateTime.Now;
            var ticker = new Ticker(TimeSpan.FromSeconds(1));

            // act
            bool ok1;
            var sentAt1 = (DateTime)ticker.C.ReceiveOk(out ok1);
            var duration1 = DateTime.Now - start;
            var offBy1 = DateTime.Now - sentAt1;

            bool ok2;
            var sentAt2 = (DateTime)ticker.C.ReceiveOk(out ok2);
            var duration2 = DateTime.Now - start;
            var offBy2 = DateTime.Now - sentAt2;

            ticker.Stop();

            // assert
            Assert.IsTrue(ok1, "ok1");
            Assert.GreaterOrEqual(duration1, TimeSpan.FromSeconds(1) - AcceptableError, "duration1");
            Assert.Less(duration1, TimeSpan.FromSeconds(1.5), "duration1");
            Assert.Less(offBy1, TimeSpan.FromSeconds(0.5), "offBy1");

            Assert.IsTrue(ok2, "ok2");
            Assert.GreaterOrEqual(duration2, TimeSpan.FromSeconds(2) - AcceptableError, "duration2");
            Assert.Less(duration2, TimeSpan.FromSeconds(2.5), "duration2");
            Assert.Less(offBy2, TimeSpan.FromSeconds(0.5), "offBy2");
        }

4. Example

Project: NsqSharp
Source File: TickerTest.cs
View license
[Test]
        public void TestSingleTicker()
        {
            // arrange
            var start = DateTime.Now;
            var ticker = new Ticker(TimeSpan.FromSeconds(1));

            // act
            bool ok;
            var sentAt = (DateTime)ticker.C.ReceiveOk(out ok);
            var duration = DateTime.Now - start;
            var offBy = DateTime.Now - sentAt;

            ticker.Stop();

            // assert
            Assert.IsTrue(ok, "ok");
            Assert.GreaterOrEqual(duration, TimeSpan.FromSeconds(1) - AcceptableError, "duration");
            Assert.Less(duration, TimeSpan.FromSeconds(1.5), "duration");
            Assert.Less(offBy, TimeSpan.FromSeconds(0.5), "offBy");
        }

5. Example

Project: NsqSharp
Source File: TickerTest.cs
View license
[Test]
        public void TestDoubleTickerWithStop()
        {
            // arrange
            var start = DateTime.Now;
            var ticker = new Ticker(TimeSpan.FromSeconds(1));

            // act
            bool ok1;
            var sentAt1 = (DateTime)ticker.C.ReceiveOk(out ok1);
            var duration1 = DateTime.Now - start;
            var offBy1 = DateTime.Now - sentAt1;

            ticker.Stop();

            var newTicker = new Ticker(TimeSpan.FromSeconds(5));
            bool? ok2 = null;
            Select
                .CaseReceiveOk(ticker.C, (d, b) => ok2 = false)
                .CaseReceive(newTicker.C, _ => ok2 = true)
                .NoDefault();

            newTicker.Stop();

            // assert
            Assert.IsTrue(ok1, "ok1");
            Assert.GreaterOrEqual(duration1, TimeSpan.FromSeconds(1) - AcceptableError, "duration1");
            Assert.Less(duration1, TimeSpan.FromSeconds(1.5), "duration1");
            Assert.Less(offBy1, TimeSpan.FromSeconds(0.5), "offBy1");

            Assert.IsNotNull(ok2, "ok2");
            Assert.IsTrue(ok2.Value, "ok2");
        }

6. Example

Project: NsqSharp
Source File: TickerTest.cs
View license
[Test]
        public void TestTickerLoopWithExitChan()
        {
            var start = DateTime.N/n ..... /n //View Source file for more details /n }

7. Example

View license
[Test]
		public void MixedTypes()
		{	
			Assert.GreaterOrEqual( 5, 3L, "int to long");
			Assert.Gr/n ..... /n //View Source file for more details /n }

8. Example

View license
[Test]
		public void MixedTypes()
		{	
			Assert.GreaterOrEqual( 5, 3L, "int to long");
			Assert.Gr/n ..... /n //View Source file for more details /n }

9. Example

View license
[Test]
		public void MixedTypes()
		{	
			Assert.GreaterOrEqual( 5, 3L, "int to long");
			Assert.Gr/n ..... /n //View Source file for more details /n }

10. Example

Project: nunit
Source File: GreaterEqualFixture.cs
View license
[Test]
        public void MixedTypes()
        {	
            Assert.GreaterOrEqual( 5, 3L, "int to/n ..... /n //View Source file for more details /n }

11. Example

Project: AutoTest.Net
Source File: GreaterEqualFixture.cs
View license
[Test]
		public void MixedTypes()
		{	
			Assert.GreaterOrEqual( 5, 3L, "int to long");
			Assert.Gr/n ..... /n //View Source file for more details /n }

12. Example

Project: AutoTest.Net
Source File: GreaterEqualFixture.cs
View license
[Test]
		public void MixedTypes()
		{	
			Assert.GreaterOrEqual( 5, 3L, "int to long");
			Assert.Gr/n ..... /n //View Source file for more details /n }

13. Example

Project: AutoTest.Net
Source File: GreaterEqualFixture.cs
View license
[Test]
		public void MixedTypes()
		{	
			Assert.GreaterOrEqual( 5, 3L, "int to long");
			Assert.Gr/n ..... /n //View Source file for more details /n }

14. Example

Project: NsqSharp
Source File: TickerTest.cs
View license
[Test]
        public void TestTickerLoopWithNemesisChan()
        {
            var start = DateTim/n ..... /n //View Source file for more details /n }

15. Example

Project: NsqSharp
Source File: TickerTest.cs
View license
[Test]
        public void TestTickerLoopWithNemesisBufferedChan()
        {
            var start =/n ..... /n //View Source file for more details /n }

16. Example

Project: NsqSharp
Source File: DeferTest.cs
View license
[Test]
        public void Given_A_Default_Requeue_Of_90s_When_Requeued_For_3s_Then_Message_Should_B/n ..... /n //View Source file for more details /n }