NUnit.Framework.Assert.Greater(int, int, string)

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

27 Examples 7

1. Example

Project: DOLSharp
Source File: SchedulerTest.cs
[Test]
		public void Scheduler_StartIntervalTimer_TaskRunMultipleTime()
		{
			var scheduler = new SimpleScheduler();
			
			int count = 0;
			var task = scheduler.Start(() => { count++; return 1; }, 1);
			
			System.Threading.Thread.Sleep(100);
			
			var intermediate = count;
			Assert.Greater(intermediate, 0, "Task Should have been Scheduled multiple time with an Interval of 1ms...");
			
			System.Threading.Thread.Sleep(100);
			task.Stop();

			Assert.Greater(count, intermediate, "Task should have been scheduled again before stopping...");
		}

2. Example

Project: MatterControl
Source File: PrinterConfigurationTests.cs
public void testExtruderCountGreaterThanZero(PrinterSettingsLayer layer, string sourceFile)
		{
			string settingValue;
			if (!layer.TryGetValue("extruder_count", out settingValue))
			{
				return;
			}

			Assert.Greater(int.Parse(settingValue), 0, "extruder_count should be greater than zero: " + sourceFile);
		}

3. Example

Project: libpalaso
Source File: LinuxKeyboardControllerTests.cs
[Test]
		public void GetAllKeyboards_GivesSeveral()
		{
			IKeyboardDefinition[] keyboards = Keyboard.Controller.AvailableKeyboards.ToArray();
			Assert.Greater(keyboards.Length, 1, "This test requires that the Windows IME has at least two languages installed.");
		}

4. Example

Project: libpalaso
Source File: WindowsKeyboardControllerTests.cs
[Test]
		[Category("Windows IME")]
		public void GetAllKeyboards_GivesSeveral()
		{
			var keyboards = Keyboard.Controller.AvailableKeyboards;
			Assert.Greater(keyboards.Count(), 1, "This test requires that the Windows IME has at least two languages installed.");
		}

5. Example

Project: FieldWorks
Source File: AdvancedMTDialogLogicTests.cs
void SetupParameterObject(IConstChartWordGroup[] affectedGroupsArray)
		{
			SetupParamObjBase();
			Assert.IsNotNull(affectedGroupsArray, "Empty parameter array.");
			Assert.Greater(affectedGroupsArray.Length, 0, "No CCWordGroups to add.");
			foreach (var group in affectedGroupsArray)
			{
				m_sentElem.AffectedWordGroups.Add(group);
			}
		}

6. Example

Project: dbdeploy.net
Source File: DirectoryScannerTest.cs
[Test]
        public void CanReadFilesFromSubDirectories()
        {
            var writer = new StringWriter();
            var directoryScanner = new DirectoryScanner(writer, Encoding.UTF8);
            
            List<ChangeScript> changeScripts = directoryScanner.GetChangeScriptsForDirectory(new DirectoryInfo(@"Mocks\Versioned"));
            
            Assert.IsNotNull(changeScripts, "Change scripts should not be null.");
            Assert.Greater(changeScripts.Count, 0, "No change scripts where found.");

            VerifyChangeScript(changeScripts, "2.0.0.0", 8, "8.Create Product Table.sql");
            VerifyChangeScript(changeScripts, "2.0.0.0", 9, "09.Add Product Data.sql");
            VerifyChangeScript(changeScripts, "2.0.0.0", 10, "10.Add Sold Column.sql");
            VerifyChangeScript(changeScripts, "v2.0.10.0", 1, "1.SQLCMD Add Customer Table.sql");
            VerifyChangeScript(changeScripts, "v2.0.10.0", 2, "2.SQLCMD Add Email Column Table.sql");
            VerifyChangeScript(changeScripts, "v2.0.10.0", 3, "3.SQLCMD Add Customer Data.sql");
        }

7. Example

Project: dbdeploy.net
Source File: ControllerTest.cs
private static void AssertRunScripts(IList<ChangeScript> scripts, params string[] expectedKeys)
        {
            Assert.Greater(scripts.Count, 0, "No scripts where found that should run.");

            for (int i = 0; i < expectedKeys.Length; i++)
            {
                Assert.Greater(scripts.Count, i, "More change scripts were expected to run.");
                Assert.AreEqual(expectedKeys[i], scripts[i].UniqueKey, "The expected script '{0}' was not next.", expectedKeys[i]);
            }

            Assert.AreEqual(expectedKeys.Length, scripts.Count, "More scripts where applied than should have been.");
        }

8. Example

Project: SharpZipLib
Source File: ZipEntryHandling.cs
void PiecewiseCompare(ZipEntry lhs, ZipEntry rhs)
		{
			Type entryType = typeof(ZipEntry);
			BindingFlags binding = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;

			FieldInfo[] fields = entryType.GetFields(binding);

			Assert.Greater(fields.Length, 8, "Failed to find fields");

			foreach (FieldInfo info in fields) {
				object lValue = info.GetValue(lhs);
				object rValue = info.GetValue(rhs);

				Assert.AreEqual(lValue, rValue);
			}
		}

9. Example

Project: ActivityManager
Source File: ZipTests.cs
void PiecewiseCompare(ZipEntry lhs, ZipEntry rhs)
		{
			Type entryType = typeof(ZipEntry);
			BindingFlags binding = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;

			FieldInfo[] fields = entryType.GetFields(binding);

			Assert.Greater(fields.Length, 8, "Failed to find fields");

			foreach (FieldInfo info in fields) {
				object lValue = info.GetValue(lhs);
				object rValue = info.GetValue(rhs);

				Assert.AreEqual(lValue, rValue);
			}
		}

10. Example

Project: FieldWorks
Source File: AtomicReferenceLauncherTests.cs
public void Initialize(LcmCache cache, ICmObject obj, int flid, string fieldName, string analysisWs)
		{
			Assert.IsNotNull(obj, "Must initialize with an object and flid.");
			Assert.Greater(flid, 0, "Must initialize with an object and flid.");
			Assert.IsNotNullOrEmpty(fieldName, "Must initialize with a field name.");
			Initialize(cache, obj, flid, fieldName, null, null, null, "", analysisWs);
		}

11. Example

Project: FieldWorks
Source File: VectorReferenceLauncherTests.cs
public void Initialize(LcmCache cache, ICmObject obj, int flid, string fieldName, string analysisWs)
		{
			Assert.IsNotNull(obj, "Must initialize with an object and flid.");
			Assert.Greater(flid, 0, "Must initialize with an object and flid.");
			Assert.IsNotNullOrEmpty(fieldName, "Must initialize with a field name.");
			Initialize(cache, obj, flid, fieldName, null, null, null, "", analysisWs);
		}

12. Example

Project: FieldWorks
Source File: WritingSystemPropertiesDialogTests.cs
internal DialogResult DoExpectedMsgBoxResult(ShowMsgBoxStatus encountered, string origWsId)
		{
			// we always expect message boxes.
			Assert.Greater(m_expectedMsgBoxes.Count, 0,
				string.Format("Didn't expect dialog {0}", encountered));
			Assert.AreEqual(m_expectedMsgBoxes[0], encountered);
			m_expectedMsgBoxes.RemoveAt(0);
			DialogResult result = m_resultsToEnforce[0];
			m_resultsToEnforce.RemoveAt(0);
			if (origWsId != null && m_expectedOrigWsIds.Count > 0)
			{
				Assert.AreEqual(m_expectedOrigWsIds[0], origWsId);
				m_expectedOrigWsIds.RemoveAt(0);
			}
			return result;
		}

13. Example

Project: Gorgon
Source File: ZipTests.cs
void PiecewiseCompare(ZipEntry lhs, ZipEntry rhs)
		{
			Type entryType = typeof(ZipEntry);
			BindingFlags binding = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;

			FieldInfo[] fields = entryType.GetFields(binding);

			Assert.Greater(fields.Length, 8, "Failed to find fields");

			foreach (FieldInfo info in fields) {
				object lValue = info.GetValue(lhs);
				object rValue = info.GetValue(rhs);

				Assert.AreEqual(lValue, rValue);
			}
		}

14. Example

Project: NodaTime
Source File: TestHelper.cs
public static void TestCompareToClass<T>(T value, T equalValue, T greaterValue) where T : class, IComparable<T>
        {
            ValidateInput(value, equalValue, greaterValue, "greaterValue");
            Assert.Greater(value.CompareTo(null), 0, "value.CompareTo<T>(null)");
            Assert.AreEqual(value.CompareTo(value), 0, "value.CompareTo<T>(value)");
            Assert.AreEqual(value.CompareTo(equalValue), 0, "value.CompareTo<T>(equalValue)");
            Assert.AreEqual(equalValue.CompareTo(value), 0, "equalValue.CompareTo<T>(value)");
            Assert.Less(value.CompareTo(greaterValue), 0, "value.CompareTo<T>(greaterValue)");
            Assert.Greater(greaterValue.CompareTo(value), 0, "greaterValue.CompareTo<T>(value)");
        }

15. Example

Project: NodaTime
Source File: TestHelper.cs
public static void TestCompareToStruct<T>(T value, T equalValue, T greaterValue) where T : struct, IComparable<T>
        {
            ValidateInput(value, equalValue, greaterValue, "greaterValue");
            Assert.AreEqual(value.CompareTo(value), 0, "value.CompareTo(value)");
            Assert.AreEqual(value.CompareTo(equalValue), 0, "value.CompareTo(equalValue)");
            Assert.AreEqual(equalValue.CompareTo(value), 0, "equalValue.CompareTo(value)");
            Assert.Less(value.CompareTo(greaterValue), 0, "value.CompareTo(greaterValue)");
            Assert.Greater(greaterValue.CompareTo(value), 0, "greaterValue.CompareTo(value)");
        }

16. Example

Project: MatterControl
Source File: OemProfileTests.cs
[Test]
		public void ExtruderCountIsGreaterThanZero()
		{
			ValidateOnAllPrinters((printer, settings) =>
			{
				string extruderCountString = settings.GetValue("extruder_count");
				if (!string.IsNullOrEmpty(extruderCountString))
				{
					int extruderCount;
					if (!int.TryParse(extruderCountString, out extruderCount))
					{
						Assert.Fail("Invalid [extruder_count] value (int parse failed): " + printer.RelativeFilePath);
					}

					// Must be greater than zero
					Assert.Greater(extruderCount, 0, "[extruder_count]: " + printer.RelativeFilePath);
				}
			});
		}

17. Example

Project: GithubXamarin
Source File: Tests.cs
[Test]
        public void LaunchingShouldDisplayList ()
        {
            app.Screenshot ("Launch");

            var items = app.Query (q => q.Id ("text1"));
            Assert.Greater (items.Count (), 0, "No List Items Found");
        }

18. Example

Project: AndroidSupportComponents
Source File: Tests.cs
[Test]
        public void LaunchingShouldDisplayList ()
        {
            app.Screenshot ("Launch");

            var items = app.Query (q => q.Id ("text1"));
            Assert.Greater (items.Count (), 0, "No List Items Found");
        }

19. Example

Project: AndroidSupportComponents
Source File: Tests.cs
[Test]
        public void LaunchingShouldDisplayList ()
        {
            app.Screenshot ("Launch");

            var items = app.Query (q => q.Id ("text1"));
            Assert.Greater (items.Count (), 0, "No List Items Found");
        }

20. Example

Project: NodaTime
Source File: TestHelper.cs
public static void TestNonGenericCompareTo<T>(T value, T equalValue, T greaterValue) where T : IComparable
        {
            // Just type the values as plain IComparable for simplicity
            IComparable value2 = value;
            IComparable equalValue2 = equalValue;
            IComparable greaterValue2 = greaterValue;

            ValidateInput(value2, equalValue2, greaterValue2, "greaterValue");
            Assert.Greater(value2.CompareTo(null), 0, "value.CompareTo<T>(null)");
            Assert.AreEqual(value2.CompareTo(value2), 0, "value.CompareTo<T>(value)");
            Assert.AreEqual(value2.CompareTo(equalValue2), 0, "value.CompareTo<T>(equalValue)");
            Assert.AreEqual(equalValue2.CompareTo(value2), 0, "equalValue.CompareTo<T>(value)");
            Assert.Less(value2.CompareTo(greaterValue2), 0, "value.CompareTo<T>(greaterValue)");
            Assert.Greater(greaterValue2.CompareTo(value2), 0, "greaterValue.CompareTo<T>(value)");
            Assert.Throws<ArgumentException>(() => value2.CompareTo(new object()));
        }

21. Example

Project: libpalaso
Source File: WindowsKeyboardControllerTests.cs
[Test]
		[Category("Windows IME")]
		public void WindowsIME_GetKeyboards_GivesSeveralButOnlyWindowsOnes()
		{
			WinKeyboardDescription[] keyboards = Keyboard.Controller.AvailableKeyboards.OfType<WinKeyboardDescription>().ToArray();
			Assert.Greater(keyboards.Length, 1, "This test requires that the Windows IME has at least two languages installed.");

			Assert.That(keyboards.Select(keyboard => keyboard.Engine), Is.All.TypeOf<WinKeyboardAdaptor>());
		}

22. Example

Project: CIAPI.CS
Source File: DefaultPricesFixture.cs
[Test]
        public void CanConsumeDefaultPricesStream()
        {
            var rpcClient = thi/n ..... /n //View Source file for more details /n }

23. Example

Project: FieldWorks
Source File: ParatextImportManagerTests.cs
[Test]
		[Category("DesktopRequired")]
		public void BtInterleavedAbortRollsBack()
		{
			m_settings/n ..... /n //View Source file for more details /n }

24. Example

Project: FieldWorks
Source File: ParatextImportManagerTests.cs
[Test]
		[Category("DesktopRequired")]
		public void BtsForMultipleWss()
		{
			m_settings.ImportTra/n ..... /n //View Source file for more details /n }

25. Example

Project: libpalaso
Source File: WindowsKeyboardControllerTests.cs
[Test]
		[Category("Windows IME")]
		public void WindowsIME_DeActivateKeyboard_RevertsToDefault()
		{
			IKeyboardDefinition[] keyboards = Keyboard.Controller.AvailableKeyboards.Where(kd => kd is WinKeyboardDescription).ToArray();
			Assert.Greater(keyboards.Length, 1, "This test requires that the Windows IME has at least two languages installed.");
			IKeyboardDefinition d = GetNonDefaultKeyboard(keyboards);
			d.Activate();
			Assert.AreEqual(d, Keyboard.Controller.ActiveKeyboard);
			Keyboard.Controller.ActivateDefaultKeyboard();
			Assert.AreNotEqual(d, Keyboard.Controller.ActiveKeyboard);
		}

26. Example

Project: FieldWorks
Source File: ParatextImportManagerTests.cs
[Test]
		[Category("DesktopRequired")]
		public void BtUndoPhmAfterImportingBtJudInOtherWs()
		{
			/n ..... /n //View Source file for more details /n }

27. Example

Project: NsqSharp
Source File: MultiImplementIHandleMessagesTest.cs
[Ignore("NSQD Integration Test")]
#endif
        [Test]
        public void Given_Two_Queues_In_One_/n ..... /n //View Source file for more details /n }