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

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

5 Examples 7

1. Example

Project: nhibernate-core
Source File: SumTests.cs
View license
[Test]
		public async Task SumSingleAsync()
		{
			float total = await (db.Products.SumAsync(p => p.ShippingWeight));
			Assert.Greater(total, 0);
		}

2. Example

Project: nhibernate-core
Source File: SumTests.cs
View license
[Test]
		public void SumSingle()
		{
			float total = db.Products.Sum(p => p.ShippingWeight);
			Assert.Greater(total, 0);
		}

3. Example

Project: VBF
Source File: CommonTests.cs
View license
[Test]
        public void PriorityQueueMinFloatTest()
        {
            var minpq = new PriorityQueue<float>(new[] { 0.3f, 0.7f, 0.1f, 0.4f, 0.5f, 0.2f, 0.9f, 0.6f }, ExtremeType.Minimum);

            float last = 0.0f;

            while (!minpq.IsEmpty)
            {
                float curr = minpq.DeleteExtreme();

                Assert.Greater(curr, last);

                last = curr;
            }
        }

4. Example

Project: VBF
Source File: CommonTests.cs
View license
[Test]
        public void PriorityQueueDecreaseKeyTest()
        {
            var minpq = new PriorityQueue<float>(new[] { 0.3f, 0.7f, 0.1f, 0.4f, 0.5f, 0.2f, 0.9f, 0.6f }, ExtremeType.Minimum);


            Assert.AreEqual(0.1f, minpq.PeekExtreme());

            minpq.ModifyValue(0.4f, 0.01f);

            Assert.AreEqual(0.01f, minpq.PeekExtreme());

            minpq.ModifyValue(0.01f, 0.001f);

            Assert.AreEqual(0.001f, minpq.PeekExtreme());
            
            float last = 0.0f;

            while (!minpq.IsEmpty)
            {
                float curr = minpq.DeleteExtreme();

                Assert.Greater(curr, last);

                last = curr;
            }
        }

5. Example

Project: VBF
Source File: CommonTests.cs
View license
[Test]
        public void PriorityQueueIncreaseKeyTest()
        {
            var minpq = new PriorityQueue<float>(new[] { 0.3f, 0.7f, 0.1f, 0.4f, 0.5f, 0.2f, 0.9f, 0.6f }, ExtremeType.Minimum);


            Assert.AreEqual(0.1f, minpq.PeekExtreme());

            minpq.ModifyValue(0.4f, 0.55f);

            Assert.AreEqual(0.1f, minpq.PeekExtreme());

            minpq.ModifyValue(0.1f, 0.22f);

            Assert.AreEqual(0.2f, minpq.PeekExtreme());

            minpq.ModifyValue(0.5f, 500f);
            minpq.Insert(100f);
            minpq.Insert(501f);

            float last = 0.0f;

            while (!minpq.IsEmpty)
            {
                float curr = minpq.DeleteExtreme();

                Assert.AreNotEqual(0.4f, curr);
                Assert.Greater(curr, last);

                last = curr;
            }
        }