NUnit.Framework.Assert.Greater(double, double)

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

8 Examples 7

1. Example

View license
private static void AssertEqualDouble (double d1, double d2, double acc)
		{
			Assert.Less (d1 - acc, d2);
			Assert.Greater (d1 + acc, d2);
		}

2. Example

View license
[Test]
        public void Can_Get_ServerTime() {

            var response = Client.Utilities.GetTime();

            Assert.AreEqual(response.RestResponse.StatusCode, System.Net.HttpStatusCode.OK);
            Assert.Greater((double)response.Data.UnixTimeStamp, 0.00D);
        }

3. Example

Project: mathnet-numerics
Source File: PrecisionTest.cs
View license
[Test]
        public void DecrementAtMinMax()
        {
            var x = double.MaxValue;
            Assert.AreEqual(double.MaxValue, x);
            x = x.Decrement();
            Assert.Greater(double.MaxValue, x);

            x = double.MinValue;
            Assert.AreEqual(double.MinValue, x);
            x = x.Decrement();
            Assert.AreEqual(double.NegativeInfinity, x);
        }

4. Example

Project: mathnet-numerics
Source File: PrecisionTest.cs
View license
[Test]
        public void IncrementAtMinMax()
        {
            var x = double.MaxValue;
            x = x.Increment();
            Assert.AreEqual(double.PositiveInfinity, x);

            x = double.MinValue;
            Assert.AreEqual(double.MinValue, x);
            x = x.Increment();
            Assert.Greater(x, double.MinValue);
        }

5. Example

View license
public static void ContinuousVapnikChervonenkisTest(double epsilon, double delta, double[] s, IContinuousDistribution dist)
        {
            // Using VC-dimension, we can bound the probability of making an error when estimating empirical probability
            // distributions. We are using Theorem 2.41 in "All Of Nonparametric Statistics".
            // http://books.google.com/books?id=MRFlzQfRg7UC&lpg=PP1&dq=all%20of%20nonparametric%20statistics&pg=PA22#v=onepage&q=%22shatter%20coe%EF%AC%83cients%20do%20not%22&f=false .</para>
            // For intervals on the real line the VC-dimension is 2.
            Assert.Greater(s.Length, Math.Ceiling(32.0 * Math.Log(16.0 / delta) / epsilon / epsilon));

            var histogram = new Histogram(s, NumberOfHistogramBuckets);
            for (var i = 0; i < NumberOfHistogramBuckets; i++)
            {
                var p = dist.CumulativeDistribution(histogram[i].UpperBound) - dist.CumulativeDistribution(histogram[i].LowerBound);
                var pe = histogram[i].Count/(double)s.Length;
                Assert.Less(Math.Abs(p - pe), epsilon, dist.ToString());
            }
        }

6. Example

View license
public static void DiscreteVapnikChervonenkisTest(double epsilon, double delta, int[] s, IDiscreteDistribution dist)
        {
            // Using VC-dimension, we can bound the probability of making an error when estimating empirical probability
            // distributions. We are using Theorem 2.41 in "All Of Nonparametric Statistics".
            // http://books.google.com/books?id=MRFlzQfRg7UC&lpg=PP1&dq=all%20of%20nonparametric%20statistics&pg=PA22#v=onepage&q=%22shatter%20coe%EF%AC%83cients%20do%20not%22&f=false .</para>
            // For intervals on the real line the VC-dimension is 2.
            Assert.Greater(s.Length, Math.Ceiling(32.0 * Math.Log(16.0 / delta) / epsilon / epsilon));

            var min = s.Min();
            var max = s.Max();

            var histogram = new int[max - min + 1];
            for (int i = 0; i < s.Length; i++)
            {
                histogram[s[i] - min]++;
            }

            for (int i = 0; i < histogram.Length; i++)
            {
                var p = dist.CumulativeDistribution(i + min) - dist.CumulativeDistribution(i + min - 1.0);
                var pe = histogram[i]/(double)s.Length;
                Assert.Less(Math.Abs(p - pe), epsilon, dist.ToString());
            }
        }

7. Example

View license
[Test]
        public void HqlDistanceMin()
        {
            const double minDistance = 40000;

            IList results = Session
                .CreateQuery(
                    @"
					select NHSP.Distance(l.Geometry, :filter), l.Geometry
					from LineStringEntity as l
					where l.Geometry is not null
					and NHSP.Distance(l.Geometry, :filter) > :minDistance
					order by NHSP.Distance(l.Geometry, :filter)")
                .SetParameter("filter", _filter, SpatialDialect.GeometryTypeOf(Session))
                .SetParameter("minDistance", minDistance)
                .SetMaxResults(100)
                .List();

            Assert.IsNotEmpty(results);
            foreach (object[] item in results)
            {
                var distance = (double)item[0];
                Assert.Greater(distance, minDistance);
                var geom = (IGeometry)item[1];
                Assert.AreEqual(geom.Distance(_filter), distance, 0.003);
            }
        }

8. Example

Project: FieldWorks
Source File: LiftExportTests.cs
View license
private void VerifyExport(XmlDocument xdoc)
		{
			var repoEntry = m_cache.ServiceLocator.GetInstanc/n ..... /n //View Source file for more details /n }