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

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

200 Examples 7

1. Example

Project: ContinuousTests
Source File: GreaterFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ))]
		public void NotGreater()
		{
			expectedMessage =
				"  Expected: greater than 5" + Environment.NewLine +
				"  But was:  4" + Environment.NewLine;
			Assert.Greater(i2,i1);
		}

2. Example

Project: ContinuousTests
Source File: GreaterFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ))]
		public void NotGreaterWhenEqual()
		{
			expectedMessage =
				"  Expected: greater than 5" + Environment.NewLine +
				"  But was:  5" + Environment.NewLine;
			Assert.Greater(i1,i1);
		}

3. Example

Project: ContinuousTests
Source File: GreaterFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ))]
		public void NotGreaterWhenEqual()
		{
			expectedMessage =
				"  Expected: greater than 5" + Environment.NewLine +
				"  But was:  5" + Environment.NewLine;
			Assert.Greater(i1,i1);
		}

4. Example

Project: ContinuousTests
Source File: GreaterFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ))]
		public void NotGreaterWhenEqual()
		{
			expectedMessage =
				"  Expected: greater than 5" + Environment.NewLine +
				"  But was:  5" + Environment.NewLine;
			Assert.Greater(i1,i1);
		}

5. Example

Project: ContinuousTests
Source File: GreaterFixture.cs
View license
[Test,ExpectedException( typeof(AssertionException))]
		public void FailureMessage()
		{
			expectedMessage =
				"  Expected: greater than 99" + Environment.NewLine +
				"  But was:  7" + Environment.NewLine;
			Assert.Greater( 7, 99 );
		}

6. Example

Project: ContinuousTests
Source File: GreaterFixture.cs
View license
[Test,ExpectedException( typeof(AssertionException))]
		public void FailureMessage()
		{
			expectedMessage =
				"  Expected: greater than 99" + Environment.NewLine +
				"  But was:  7" + Environment.NewLine;
			Assert.Greater( 7, 99 );
		}

7. Example

Project: ContinuousTests
Source File: GreaterFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ))]
		public void NotGreater()
		{
			expectedMessage =
				"  Expected: greater than 5" + Environment.NewLine +
				"  But was:  4" + Environment.NewLine;
			Assert.Greater(i2,i1);
		}

8. Example

Project: ContinuousTests
Source File: GreaterFixture.cs
View license
[Test,ExpectedException( typeof(AssertionException))]
		public void FailureMessage()
		{
			expectedMessage =
				"  Expected: greater than 99" + Environment.NewLine +
				"  But was:  7" + Environment.NewLine;
			Assert.Greater( 7, 99 );
		}

9. Example

Project: ContinuousTests
Source File: GreaterFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ))]
		public void NotGreater()
		{
			expectedMessage =
				"  Expected: greater than 5" + Environment.NewLine +
				"  But was:  4" + Environment.NewLine;
			Assert.Greater(i2,i1);
		}

10. Example

Project: nuve
Source File: Tester.cs
View license
public static void HasAnalysis(string token)
        {
            IList<Word> solutions = Language.Analyze(token);
            Assert.Greater(solutions.Count, 0);
        }

11. Example

Project: h-opc
Source File: DaTest.cs
View license
[Test]
    public void DaExploreFolder()
    {
      var rootTags = _client.ExploreFolder(string.Empty);
      Assert.Greater(rootTags.Count(), 0);
    }

12. Example

View license
[Test]
        public void GetWorkSpaceTags()
        {
            var t = new WorkspaceService();
            var obj = t.List().FirstOrDefault();
            var lst = t.Tags(obj.Id.Value);
            Assert.Greater(lst.Count(), 0);
        }

13. Example

View license
[Test]
        public void GetWorkSpaceUsers()
        {
            var t = new WorkspaceService();
            var obj = t.List().FirstOrDefault();
            var lst = t.Users(obj.Id.Value);
            Assert.Greater(lst.Count(), 0);
        }

14. Example

View license
[Test]
        public void GetWorkSpaceTasks()
        {
            var t = new WorkspaceService();
            var obj = t.List().FirstOrDefault();
            var lst = t.Tasks(obj.Id.Value);
            Assert.Greater(lst.Count(), 0);
        }

15. Example

View license
[Test]
        public void GetWorkSpaceClients()
        {
            var t = new WorkspaceService();
            var obj = t.List().FirstOrDefault();
            var lst = t.Clients(obj.Id.Value);
            Assert.Greater(lst.Count(), 0);
        }

16. Example

View license
[Test]
        public void GetWorkSpaceProjects()
        {
            var t = new WorkspaceService();
            var obj = t.List().FirstOrDefault();
            var lst = t.Projects(obj.Id.Value);
            Assert.Greater(lst.Count(),0);
        }

17. Example

Project: EfSchemaCompare
Source File: ExtendAsserts.cs
View license
internal static void ShouldBeGreaterThan(this int actualValue, int greaterThanThis, string errorMessage = null)
        {
            Assert.Greater(actualValue, greaterThanThis);
        }

18. Example

Project: GenericServices
Source File: ExtendAsserts.cs
View license
internal static void ShouldBeGreaterThan(this int actualValue, int greaterThanThis, string errorMessage = null)
        {
            Assert.Greater(actualValue, greaterThanThis);
        }

19. Example

View license
[Test]
        public void AutoRegister_With_Valid_Registration_And_Properties_Returns_Automatically() {
            var registrator = new DefaultAutoRegistrator(null, null);

            var count = 0;
            registrator.AutoRegister(new ServiceRegistration
            {
                RegistrationHandler = (locator, type) => { count++; },
                ServiceType = typeof(object),
                TypeFilter = (t1, t2) => true
            });

            Assert.Greater(count, 0);
        }

20. Example

Project: n2cms
Source File: DefinitionFixture.cs
View license
[Test]
        public void DefinitionManagerHasCorrectNumberOfDefinitions()
        {
            Assert.Greater(engine.Definitions.GetDefinitions().Count(), 9);
        }

21. Example

Project: n2cms
Source File: ItemComparerTests.cs
View license
[Test]
        public void CompareTitle()
        {
            ItemComparer comparer = new ItemComparer("Title");
            int comparisonResult = comparer.Compare(item1, item2);
            Assert.Greater(0, comparisonResult);
        }

22. Example

Project: n2cms
Source File: ItemComparerTests.cs
View license
[Test]
        public void CompareTitleStatic()
        {
            int comparisonResult = ItemComparer.Compare(item1, item2, "Title", false);
            Assert.Greater(0, comparisonResult);
        }

23. Example

Project: n2cms
Source File: ItemComparerTests.cs
View license
[Test]
        public void CompareTitle2()
        {
            ItemComparer comparer = new ItemComparer("Title", false);
            int comparisonResult = comparer.Compare(item1, item2);
            Assert.Greater(0, comparisonResult);
        }

24. Example

Project: mongodb-csharp
Source File: TestMongo.cs
View license
[Test]
        public void TestGetDatabasesReturnsSomething()
        {
            using(var m = new Mongo(_connectionString))
            {
                m.Connect();
                var databaseCount = m.GetDatabases().Count();

                Assert.Greater(databaseCount, 1);
            }
        }

25. Example

Project: libpalaso
Source File: UDisksTests.cs
View license
[Test, Ignore("not all systems have adapters")]
		public void EnumerateAdapters_HasSome()
		{
			var disks = new UDisks();
			var adapters = disks.Interface.EnumerateAdapters();
			Assert.Greater(adapters.Count(), 0);
		}

26. Example

Project: libpalaso
Source File: UDisksTests.cs
View license
[Test]
		public void EnumerateDevices_HasSome()
		{
			var disks = new UDisks();
			var devices = disks.Interface.EnumerateDevices();
			Assert.Greater(devices.Count(), 0);
		}

27. Example

View license
[Test]
		public void ReadsIsoRegistry()
		{
			Assert.Greater(StandardSubtags.RegisteredLanguages.Count, 100);
		}

28. Example

Project: libpalaso
Source File: UDisksTests.cs
View license
[Test]
		public void EnumerateDeviceFiles_HasSome()
		{
			var disks = new UDisks();
			var deviceFiles = disks.Interface.EnumerateDeviceFiles();
			Assert.Greater(deviceFiles.Count(), 0);
		}

29. Example

Project: libpalaso
Source File: UDisksTests.cs
View license
[Test, Ignore("not all systems have ports")]
		public void EnumeratePorts_HasSome()
		{
			var disks = new UDisks();
			var ports = disks.Interface.EnumeratePorts();
			Assert.Greater(ports.Count(), 0);
		}

30. Example

Project: Umbraco-CMS
Source File: CacheProviderTests.cs
View license
[Test]
        public void Does_Not_Cache_Exceptions()
        {
            var counter = 0;

            object result;
            try
            {
                result = Provider.GetCacheItem("Blah", () =>
                    {
                        counter++;
                        throw new Exception("Do not cache this");
                    });
            }
            catch (Exception){}

            try
            {
                result = Provider.GetCacheItem("Blah", () =>
                {
                    counter++;
                    throw new Exception("Do not cache this");
                });
            }
            catch (Exception){}

            Assert.Greater(counter, 1);

        }

31. Example

Project: Umbraco-CMS
Source File: TypeFinderTests.cs
View license
[Ignore]
        [Test]
        public void Benchmark_New_Finder()
        {
            using (DisposableTimer.TraceDuration<TypeFinderTests>("Starting test", "Finished test"))
            {
                using (DisposableTimer.TraceDuration<TypeFinderTests>("Starting FindClassesOfType", "Finished FindClassesOfType"))
                {
                    for (var i = 0; i < 1000; i++)
                    {
                        Assert.Greater(TypeFinder.FindClassesOfType<DisposableObject>(_assemblies).Count(), 0);
                    }
                }
                using (DisposableTimer.TraceDuration<TypeFinderTests>("Starting FindClassesOfTypeWithAttribute", "Finished FindClassesOfTypeWithAttribute"))
                {
                    for (var i = 0; i < 1000; i++)
                    {
                        Assert.Greater(TypeFinder.FindClassesOfTypeWithAttribute<TestEditor, MyTestAttribute>(_assemblies).Count(), 0);
                    }
                }
                using (DisposableTimer.TraceDuration<TypeFinderTests>("Starting FindClassesWithAttribute", "Finished FindClassesWithAttribute"))
                {
                    for (var i = 0; i < 1000; i++)
                    {
                        Assert.Greater(TypeFinder.FindClassesWithAttribute<XsltExtensionAttribute>(_assemblies).Count(), 0);
                    }
                }
            }

        }

32. Example

Project: AutoTest.Net
Source File: GreaterFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ))]
		public void NotGreaterWhenEqual()
		{
			expectedMessage =
				"  Expected: greater than 5" + Environment.NewLine +
				"  But was:  5" + Environment.NewLine;
			Assert.Greater(i1,i1);
		}

33. Example

Project: AutoTest.Net
Source File: GreaterFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ))]
		public void NotGreater()
		{
			expectedMessage =
				"  Expected: greater than 5" + Environment.NewLine +
				"  But was:  4" + Environment.NewLine;
			Assert.Greater(i2,i1);
		}

34. Example

Project: AutoTest.Net
Source File: GreaterFixture.cs
View license
[Test,ExpectedException( typeof(AssertionException))]
		public void FailureMessage()
		{
			expectedMessage =
				"  Expected: greater than 99" + Environment.NewLine +
				"  But was:  7" + Environment.NewLine;
			Assert.Greater( 7, 99 );
		}

35. Example

Project: AutoTest.Net
Source File: GreaterFixture.cs
View license
[Test,ExpectedException( typeof(AssertionException))]
		public void FailureMessage()
		{
			expectedMessage =
				"  Expected: greater than 99" + Environment.NewLine +
				"  But was:  7" + Environment.NewLine;
			Assert.Greater( 7, 99 );
		}

36. Example

Project: AutoTest.Net
Source File: GreaterFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ))]
		public void NotGreaterWhenEqual()
		{
			expectedMessage =
				"  Expected: greater than 5" + Environment.NewLine +
				"  But was:  5" + Environment.NewLine;
			Assert.Greater(i1,i1);
		}

37. Example

Project: AutoTest.Net
Source File: GreaterFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ))]
		public void NotGreaterWhenEqual()
		{
			expectedMessage =
				"  Expected: greater than 5" + Environment.NewLine +
				"  But was:  5" + Environment.NewLine;
			Assert.Greater(i1,i1);
		}

38. Example

Project: AutoTest.Net
Source File: GreaterFixture.cs
View license
[Test,ExpectedException( typeof(AssertionException))]
		public void FailureMessage()
		{
			expectedMessage =
				"  Expected: greater than 99" + Environment.NewLine +
				"  But was:  7" + Environment.NewLine;
			Assert.Greater( 7, 99 );
		}

39. Example

Project: AutoTest.Net
Source File: GreaterFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ))]
		public void NotGreater()
		{
			expectedMessage =
				"  Expected: greater than 5" + Environment.NewLine +
				"  But was:  4" + Environment.NewLine;
			Assert.Greater(i2,i1);
		}

40. Example

Project: AutoTest.Net
Source File: GreaterFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ))]
		public void NotGreater()
		{
			expectedMessage =
				"  Expected: greater than 5" + Environment.NewLine +
				"  But was:  4" + Environment.NewLine;
			Assert.Greater(i2,i1);
		}

41. Example

View license
[Test]
        public async Task Test_QueryAsync()
        {
            using (var bucket = _cluster.OpenBucket("beer-sample"))
            {
                var query = bucket.CreateQuery("beer", "brewery_beers").Limit(10);

                var result = await bucket.QueryAsync<dynamic>(query);
                Assert.IsTrue(result.Success);
                Assert.Greater(result.Rows.Count(), 0);
            }
        }

42. Example

Project: csnumerics
Source File: BobyqaTests.cs
View license
[Test]
        public void FindMinimum_LogOutput_OutputNonEmpty()
        {
            const int n = 9;
            var optimizer = new Bobyqa(n, this.Rosen) { Logger = Console.Out }; 
            using (var logger = new StringWriter())
            {
                optimizer.Logger = logger;
                optimizer.FindMinimum(Enumerable.Repeat(0.1, n).ToArray());
                Assert.Greater(logger.ToString().Length, 0);
            }
        }

43. Example

View license
[TestCase("/")]
        [TestCase("//")]
        [TestCase("///")]
        [TestCase("\\")]
        [TestCase("\\\\")]
        [TestCase("\\\\\\")]
        [TestCase("/Test/../")]
        [TestCase("/Test/mmm/../../")]
        [TestCase("\\Test\\..\\")]
        [TestCase("\\Test\\mmm\\..\\..\\")]
        [TestCase("\\Test\\")]
        [TestCase("..\\")]
        public void DeleteFiles_Should_Not_Able_To_Delete_Root_Folder(string path)
        {
            //Action
            FileSystemUtils.DeleteFiles(new string[] {path});

            var files = Directory.GetFiles(Globals.ApplicationMapPath, "*.*", SearchOption.AllDirectories);
            Assert.Greater(files.Length, 0);
        }

44. Example

View license
[Test]
		public void CanExtractLinksFromText()
		{
			using (SimpleWebServer server = new SimpleWebServer())
			{
				List<PropertyBag> collectedLinks = new List<PropertyBag>();
				new CrawlerConfiguration()
					.CrawlSeed(server.BaseUrl + "/Content/NCrawler - Home.txt")
					.Do((crawler, bag) =>
					{
						collectedLinks.Add(bag);
					})
					.MaxCrawlCount(1)
					.Download()
					.TextProcessor()
					.AddLoggerStep()
					.Run();

				Assert.Greater(collectedLinks.Count, 1);
			}
		}

45. Example

View license
[Test]
		public void CanExtractLinksFromHtml()
		{
			using (SimpleWebServer server = new SimpleWebServer())
			{
				List<PropertyBag> collectedLinks = new List<PropertyBag>();
				new CrawlerConfiguration()
					.CrawlSeed(server.BaseUrl + "/Content/NCrawler - Home.html")
					.Do((crawler, bag) =>
					{
						collectedLinks.Add(bag);
					})
					.MaxCrawlCount(1)
					.Download()
					.HtmlProcessor()
					.AddLoggerStep()
					.Run();

				Assert.Greater(collectedLinks.Count, 1);
			}
		}

46. Example

Project: whois
Source File: TcpReaderTest.cs
View license
[Test]
        public void TestReadWhoisForCogworksCoUk()
        {
            string result;

            using (var reader = new TcpReader())
            {
                result = reader.Read("whois.nic.uk", 43, "cogworks.co.uk");
            }

            // Just check the domain name is in the response
            Assert.Greater(result.IndexOf("cogworks.co.uk"), -1);
        }

47. Example

Project: C--Toggl-Api-Client
Source File: UserTests.cs
View license
[Test]
        public void GetCurrentExtendedTest()
        {
            var t = new UserService();
            var obj = t.GetCurrentExtended();

            Assert.AreEqual(Constants.DefaultUserId, obj.Id);

            Assert.Greater(obj.Clients.Count(), 0);
            Assert.Greater(obj.Projects.Count(), 0);
            Assert.Greater(obj.Tags.Count(), 0);
            Assert.Greater(obj.TimeEntries.Count(), 0);
            Assert.Greater(obj.Workspaces.Count(), 0);
        }

48. Example

Project: Glass.Mapper
Source File: MiscFixture.cs
View license
[Test]
        public void GenericModelTest_CanRetrieveAGenericModel_WithGenericChildren()
        {
            /*
             * Tests that we can save to an item property.
             */

            //Assign
            var context = Context.Create(Utilities.CreateStandardResolver());

            var db = Factory.GetDatabase("master");
            var scContext = new SitecoreService(db);
            string path = "/sitecore/content/";



            //Act
            var instance1 = scContext.GetItem<Parent<Child1>>(path);
            var instance2 = scContext.GetItem<Parent<Child2>>(path);


            //Assert
            Assert.IsNotNull(instance1);
            Assert.Greater(instance1.Children.Count(),0);
            Assert.IsNotNull(instance1.Children.FirstOrDefault(x=>x.Name == "Tests"));

            Assert.IsNotNull(instance2);
            Assert.Greater(instance2.Children.Count(), 0);
            Assert.IsNotNull(instance2.Children.FirstOrDefault(x => x.Name == "Tests"));
        }

49. Example

Project: Glass.Mapper
Source File: MiscFixture.cs
View license
[Test]
        public void GenericModelTest_CanRetrieveAGenericModel_WithGenericChildren()
        {/n ..... /n //View Source file for more details /n }

50. Example

Project: Glass.Mapper
Source File: DynamicItemFixture.cs
View license
[Test]
        public void BaseTemplateIds_ReturnsBaseTemplateIds()
        {
            //Arrange
            //Assign
            Item item = _db.GetItem(TargetPath);

            dynamic d = new DynamicItem(item);

            //Act
            var result = d.BaseTemplateIds as IEnumerable<Guid>;

            //Assert
            Assert.Greater(result.Count(), 10);
        }