NUnit.Framework.Assert.Less(double, double, string)

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

19 Examples 7

1. Example

Project: MatterControl
Source File: OemProfileTests.cs
View license
[Test]
		public void LayerHeightLessThanNozzleDiameter()
		{
			ValidateOnAllPrinters((printer, settings) =>
			{
				if (settings.GetValue("output_only_first_layer") == "1")
				{
					return;
				}

				float nozzleDiameter = float.Parse(settings.GetValue(SettingsKey.nozzle_diameter));
				float layerHeight = float.Parse(settings.GetValue(SettingsKey.layer_height));

				double maximumLayerHeight = nozzleDiameter * 85;

				// TODO: Remove once validated and resolved
				if (layerHeight >= maximumLayerHeight)
				{
					printer.RuleViolated = true;
					return;
				}

				Assert.Less(layerHeight, maximumLayerHeight, "[layer_height] must be less than [minimumLayerHeight]: " + printer.RelativeFilePath);
			});
		}

2. Example

View license
[Test]
        public void TestWhiteGaussianNoiseIsWhite()
        {
            for(int z = 0; z &l/n ..... /n //View Source file for more details /n }

3. Example

Project: MatterControl
Source File: OemProfileTests.cs
View license
[Test]
		public void FirstLayerHeightLessThanNozzleDiameterXExtrusionMultiplier()
		{
			ValidateOnAllPrinters((printer, settings) =>
			{
				if (settings.GetValue("output_only_first_layer") == "1")
				{
					return;
				}

				float nozzleDiameter = float.Parse(settings.GetValue(SettingsKey.nozzle_diameter));
				float layerHeight = float.Parse(settings.GetValue(SettingsKey.layer_height));


				float firstLayerExtrusionWidth;

				string firstLayerExtrusionWidthString = settings.GetValue(SettingsKey.first_layer_extrusion_width);
				if (!string.IsNullOrEmpty(firstLayerExtrusionWidthString) && firstLayerExtrusionWidthString.Trim() != "0")
				{
					firstLayerExtrusionWidth = ValueOrPercentageOf(firstLayerExtrusionWidthString, nozzleDiameter);
				}
				else
				{
					firstLayerExtrusionWidth = nozzleDiameter;
				}

				string firstLayerHeightString = settings.GetValue(SettingsKey.first_layer_height);
				if (!string.IsNullOrEmpty(firstLayerHeightString))
				{
					float firstLayerHeight = ValueOrPercentageOf(firstLayerHeightString, layerHeight);

					double maximumLayerHeight = firstLayerExtrusionWidth * 0.85;

					// TODO: Remove once validated and resolved
					if (firstLayerHeight >= maximumLayerHeight)
					{
						printer.RuleViolated = true;
						return;
					}

					Assert.Less(firstLayerHeight, maximumLayerHeight, "[first_layer_height] must be less than [firstLayerExtrusionWidth]: " + printer.RelativeFilePath);
				}
				
			});
		}

4. Example

Project: AutoTest.Net
Source File: LessFixture.cs
View license
[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 }

5. Example

Project: AutoTest.Net
Source File: LessFixture.cs
View license
[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 }

6. Example

Project: AutoTest.Net
Source File: LessFixture.cs
View license
[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 }

7. Example

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

8. 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());
            }
        }

9. Example

Project: ContinuousTests
Source File: LessFixture.cs
View license
[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 }

10. Example

Project: ContinuousTests
Source File: LessFixture.cs
View license
[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 }

11. Example

Project: ContinuousTests
Source File: LessFixture.cs
View license
[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 }

12. 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());
            }
        }

13. Example

Project: ContinuousTests
Source File: LessFixture.cs
View license
[Test]
		public void Less()
		{
			// Testing all forms after seeing some bugs. CFP
			Assert.Less(i1,i2);
			Assert.Less(i1,i2,"int");
			Assert.Less(i1,i2,"{0}","int");
			Assert.Less(u1,u2,"uint");
			Assert.Less(u1,u2,"{0}","uint");
			Assert.Less(l1,l2,"long");
			Assert.Less(l1,l2,"{0}","long");
			Assert.Less(ul1,ul2,"ulong");
			Assert.Less(ul1,ul2,"{0}","ulong");
			Assert.Less(d1,d2);
			Assert.Less(d1,d2, "double");
			Assert.Less(d1,d2, "{0}", "double");
			Assert.Less(de1,de2);
			Assert.Less(de1,de2, "decimal");
			Assert.Less(de1,de2, "{0}", "decimal");
			Assert.Less(f1,f2);
			Assert.Less(f1,f2, "float");
			Assert.Less(f1,f2, "{0}", "float");
		}

14. Example

Project: nunit
Source File: LessFixture.cs
View license
[Test]
        public void Less()
        {
            // Testing all forms after seeing some bugs. CFP
            Assert.Less(i1,i2);
            Assert.Less(i1,i2,"int");
            Assert.Less(i1,i2,"{0}","int");
            Assert.Less(u1,u2,"uint");
            Assert.Less(u1,u2,"{0}","uint");
            Assert.Less(l1,l2,"long");
            Assert.Less(l1,l2,"{0}","long");
            Assert.Less(ul1,ul2,"ulong");
            Assert.Less(ul1,ul2,"{0}","ulong");
            Assert.Less(d1,d2);
            Assert.Less(d1,d2, "double");
            Assert.Less(d1,d2, "{0}", "double");
            Assert.Less(de1,de2);
            Assert.Less(de1,de2, "decimal");
            Assert.Less(de1,de2, "{0}", "decimal");
            Assert.Less(f1,f2);
            Assert.Less(f1,f2, "float");
            Assert.Less(f1,f2, "{0}", "float");
        }

15. Example

Project: AutoTest.Net
Source File: LessFixture.cs
View license
[Test]
		public void Less()
		{
			// Testing all forms after seeing some bugs. CFP
			Assert.Less(i1,i2);
			Assert.Less(i1,i2,"int");
			Assert.Less(i1,i2,"{0}","int");
			Assert.Less(u1,u2,"uint");
			Assert.Less(u1,u2,"{0}","uint");
			Assert.Less(l1,l2,"long");
			Assert.Less(l1,l2,"{0}","long");
			Assert.Less(ul1,ul2,"ulong");
			Assert.Less(ul1,ul2,"{0}","ulong");
			Assert.Less(d1,d2);
			Assert.Less(d1,d2, "double");
			Assert.Less(d1,d2, "{0}", "double");
			Assert.Less(de1,de2);
			Assert.Less(de1,de2, "decimal");
			Assert.Less(de1,de2, "{0}", "decimal");
			Assert.Less(f1,f2);
			Assert.Less(f1,f2, "float");
			Assert.Less(f1,f2, "{0}", "float");
		}

16. Example

Project: ContinuousTests
Source File: LessFixture.cs
View license
[Test]
		public void Less()
		{
			// Testing all forms after seeing some bugs. CFP
			Assert.Less(i1,i2);
			Assert.Less(i1,i2,"int");
			Assert.Less(i1,i2,"{0}","int");
			Assert.Less(u1,u2,"uint");
			Assert.Less(u1,u2,"{0}","uint");
			Assert.Less(l1,l2,"long");
			Assert.Less(l1,l2,"{0}","long");
			Assert.Less(ul1,ul2,"ulong");
			Assert.Less(ul1,ul2,"{0}","ulong");
			Assert.Less(d1,d2);
			Assert.Less(d1,d2, "double");
			Assert.Less(d1,d2, "{0}", "double");
			Assert.Less(de1,de2);
			Assert.Less(de1,de2, "decimal");
			Assert.Less(de1,de2, "{0}", "decimal");
			Assert.Less(f1,f2);
			Assert.Less(f1,f2, "float");
			Assert.Less(f1,f2, "{0}", "float");
		}

17. Example

Project: AutoTest.Net
Source File: LessFixture.cs
View license
[Test]
		public void Less()
		{
			// Testing all forms after seeing some bugs. CFP
			Assert.Less(i1,i2);
			Assert.Less(i1,i2,"int");
			Assert.Less(i1,i2,"{0}","int");
			Assert.Less(u1,u2,"uint");
			Assert.Less(u1,u2,"{0}","uint");
			Assert.Less(l1,l2,"long");
			Assert.Less(l1,l2,"{0}","long");
			Assert.Less(ul1,ul2,"ulong");
			Assert.Less(ul1,ul2,"{0}","ulong");
			Assert.Less(d1,d2);
			Assert.Less(d1,d2, "double");
			Assert.Less(d1,d2, "{0}", "double");
			Assert.Less(de1,de2);
			Assert.Less(de1,de2, "decimal");
			Assert.Less(de1,de2, "{0}", "decimal");
			Assert.Less(f1,f2);
			Assert.Less(f1,f2, "float");
			Assert.Less(f1,f2, "{0}", "float");
		}

18. Example

Project: AutoTest.Net
Source File: LessFixture.cs
View license
[Test]
		public void Less()
		{
			// Testing all forms after seeing some bugs. CFP
			Assert.Less(i1,i2);
			Assert.Less(i1,i2,"int");
			Assert.Less(i1,i2,"{0}","int");
			Assert.Less(u1,u2,"uint");
			Assert.Less(u1,u2,"{0}","uint");
			Assert.Less(l1,l2,"long");
			Assert.Less(l1,l2,"{0}","long");
			Assert.Less(ul1,ul2,"ulong");
			Assert.Less(ul1,ul2,"{0}","ulong");
			Assert.Less(d1,d2);
			Assert.Less(d1,d2, "double");
			Assert.Less(d1,d2, "{0}", "double");
			Assert.Less(de1,de2);
			Assert.Less(de1,de2, "decimal");
			Assert.Less(de1,de2, "{0}", "decimal");
			Assert.Less(f1,f2);
			Assert.Less(f1,f2, "float");
			Assert.Less(f1,f2, "{0}", "float");
		}

19. Example

Project: ContinuousTests
Source File: LessFixture.cs
View license
[Test]
		public void Less()
		{
			// Testing all forms after seeing some bugs. CFP
			Assert.Less(i1,i2);
			Assert.Less(i1,i2,"int");
			Assert.Less(i1,i2,"{0}","int");
			Assert.Less(u1,u2,"uint");
			Assert.Less(u1,u2,"{0}","uint");
			Assert.Less(l1,l2,"long");
			Assert.Less(l1,l2,"{0}","long");
			Assert.Less(ul1,ul2,"ulong");
			Assert.Less(ul1,ul2,"{0}","ulong");
			Assert.Less(d1,d2);
			Assert.Less(d1,d2, "double");
			Assert.Less(d1,d2, "{0}", "double");
			Assert.Less(de1,de2);
			Assert.Less(de1,de2, "decimal");
			Assert.Less(de1,de2, "{0}", "decimal");
			Assert.Less(f1,f2);
			Assert.Less(f1,f2, "float");
			Assert.Less(f1,f2, "{0}", "float");
		}