Here are the examples of the csharp api class NUnit.Framework.Assert.Less(System.IComparable, System.IComparable, string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
12 Examples
0
1. Example
Project: Pash
Source File: NUnitSpecificationExtensions.cs
Source File: NUnitSpecificationExtensions.cs
public static IComparable ShouldBeLessThan(this IComparable arg1, IComparable arg2, string message = "") { Assert.Less(arg1, arg2, message); return arg2; }
0
2. Example
Project: NsqSharp
Source File: TickerTest.cs
Source File: TickerTest.cs
[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"); }
0
3. Example
Project: NsqSharp
Source File: TickerTest.cs
Source File: TickerTest.cs
[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"); }
0
4. Example
Project: NsqSharp
Source File: TickerTest.cs
Source File: TickerTest.cs
[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"); }
0
5. Example
Project: ContinuousTests
Source File: LessFixture.cs
Source File: LessFixture.cs
[Test] public void MixedTypes() { Assert.Less( 5, 8L, "int to long"); Assert.Less( 5, 8.2/n ..... /n //View Source file for more details /n }
0
6. Example
Project: ContinuousTests
Source File: LessFixture.cs
Source File: LessFixture.cs
[Test] public void MixedTypes() { Assert.Less( 5, 8L, "int to long"); Assert.Less( 5, 8.2/n ..... /n //View Source file for more details /n }
0
7. Example
Project: ContinuousTests
Source File: LessFixture.cs
Source File: LessFixture.cs
[Test] public void MixedTypes() { Assert.Less( 5, 8L, "int to long"); Assert.Less( 5, 8.2/n ..... /n //View Source file for more details /n }
0
8. Example
Project: nunit
Source File: LessFixture.cs
Source File: LessFixture.cs
[Test] public void MixedTypes() { Assert.Less( 5, 8L, "int to long"); /n ..... /n //View Source file for more details /n }
0
9. Example
Project: AutoTest.Net
Source File: LessFixture.cs
Source File: LessFixture.cs
[Test] public void MixedTypes() { Assert.Less( 5, 8L, "int to long"); Assert.Less( 5, 8.2/n ..... /n //View Source file for more details /n }
0
10. Example
Project: AutoTest.Net
Source File: LessFixture.cs
Source File: LessFixture.cs
[Test] public void MixedTypes() { Assert.Less( 5, 8L, "int to long"); Assert.Less( 5, 8.2/n ..... /n //View Source file for more details /n }
0
11. Example
Project: AutoTest.Net
Source File: LessFixture.cs
Source File: LessFixture.cs
[Test] public void MixedTypes() { Assert.Less( 5, 8L, "int to long"); Assert.Less( 5, 8.2/n ..... /n //View Source file for more details /n }
0
12. Example
Project: NsqSharp
Source File: DeferTest.cs
Source File: DeferTest.cs
[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 }