NUnit.Framework.Is.AtLeast(object)

Here are the examples of the csharp api NUnit.Framework.Is.AtLeast(object) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 Source : StartNewLongRunning_Should.cs
with Apache License 2.0
from AutomateThePlanet

[Test]
        public void WaitedForCorrectFrequency_When_OneSecondFrequencyIsSpecified()
        {
            // Arrange
            var taskProvider = new TaskProvider(_exceptionLoggerMock.Object);
            var cancellationTokenSource = new CancellationTokenSource();
            int actionTimesCalled = 0;

            // Act
            var stopwatch = new Stopwatch();
            var task = taskProvider.StartNewLongRunningRepeating(cancellationTokenSource, () => actionTimesCalled++, 200);
            Thread.Sleep(400);
            cancellationTokenSource.Cancel();
            task?.Wait();
            stopwatch.Stop();

            // replacedert
            replacedert.That(actionTimesCalled, Is.AtLeast(2));
            replacedert.That(task?.Status, Is.EqualTo(TaskStatus.RanToCompletion));
            replacedert.That(stopwatch.Elapsed, Is.EqualTo(TimeSpan.FromMilliseconds(200)).Within(250).Milliseconds);
        }

19 Source : BindingTestAssertions.cs
with MIT License
from roozbehid

public static void replacedertConfig (MetadataSet metadata, XmlDoreplacedent xml, TestLabel label)
		{
			label.EnterScope ("import");
			var importer = new WsdlImporter (metadata);
			var endpoints = importer.ImportAllEndpoints ();
			CheckImportErrors (importer, label);
			replacedert.That (endpoints.Count, Is.AtLeast (1), label.Get ());
			label.LeaveScope ();

			var nav = xml.CreateNavigator ();

			// FIXME: Check endpoints.

			label.EnterScope ("endpoints");
			var endpoinreplaceder = nav.Select ("/configuration/system.serviceModel/client/endpoint");
			replacedert.That (endpoinreplaceder.Count, Is.EqualTo (endpoints.Count), label.Get ());
			
			label.LeaveScope ();
		}