NUnit.Framework.Assert.Greater(System.IComparable, System.IComparable)

Here are the examples of the csharp api class NUnit.Framework.Assert.Greater(System.IComparable, System.IComparable) 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 NotGreaterIComparable()
		{
			expectedMessage =
				"  Expected: greater than TableDirect" + Environment.NewLine +
				"  But was:  StoredProcedure" + Environment.NewLine;
			Assert.Greater(e2,e1);
		}

2. Example

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

3. Example

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

4. Example

View license
[Test]
        public async Task When_EnhancedDurability_Is_Enabled_MutationToken_Is_Populated_For_Mutation()
        {
            const string key = "When_EnhancedDurability_Is_Enabled_MutationToken_Is_Populated_For_Mutation_Async";
            var config = new ClientConfiguration
            {
                Servers = new List<Uri>{ new Uri(ConfigurationManager.AppSettings["bootstrapUrl"])},
                BucketConfigs = new Dictionary<string, BucketConfiguration>
                {
                    {
                        "default", new BucketConfiguration
                        {
                            UseEnhancedDurability = true
                        }
                    }
                }
            };
            using (var cluster = new Cluster(config))
            {
                using (var bucket = cluster.OpenBucket())
                {
                    bucket.Remove(key);
                    var result = await bucket.InsertAsync(key, "foo");
                    Assert.Greater(result.Token.SequenceNumber, 0);
                    Assert.Greater(result.Token.VBucketUUID, 0);
                }
            }
        }

5. Example

View license
[Test]
        public void When_EnhancedDurability_Is_Enabled_MutationToken_Is_Populated_For_Mutation()
        {
            const string key = "When_EnhancedDurability_Is_Enabled_MutationToken_Is_Populated_For_Mutation";
            var config = ClientConfigUtil.GetConfiguration();
            config.BucketConfigs = new Dictionary<string, BucketConfiguration>
            {
                {
                    "default", new BucketConfiguration
                    {
                        UseEnhancedDurability = true
                    }
                }
            };
            using (var cluster = new Cluster(config))
            {
                using (var bucket = cluster.OpenBucket())
                {
                    bucket.Remove(key);
                    var result = bucket.Insert(key, "foo");
                    Assert.Greater(result.Token.SequenceNumber, 0);
                    Assert.Greater(result.Token.VBucketUUID, 0);
                }
            }
        }

6. Example

View license
[Test]
        public void Test_ListBucketsAsync()
        {
            var configuration = new ClientConfiguration
            {
                Servers = new List<Uri>
                {
                    new Uri(ConfigurationManager.AppSettings["bootstrapUrl"])
                }
            };
            using (var cluster = new Cluster(configuration))
            {
                var clusterManager = cluster.CreateManager("Administrator", "password");
                var results = clusterManager.ListBucketsAsync().Result;
                Assert.Greater(results.Value.Count, 0);
            }
        }

7. Example

View license
[Test]
        public void When_Operation_Is_Created_Opaque_Is_Incremented()
        {
            var get1 = new Get<dynamic>("thekey", null, Transcoder, OperationLifespanTimeout);
            var get2 = new Get<dynamic>("thekey", null, Transcoder, OperationLifespanTimeout);
            Assert.Greater(get2.Opaque, get1.Opaque);

            var set3 = new Set<dynamic>("thekey", "the value", null, Transcoder, OperationLifespanTimeout);
            Assert.Greater(set3.Opaque, get2.Opaque);

            var set4 = new Set<string>("thekey", "the value", null, Transcoder, OperationLifespanTimeout);
            Assert.Greater(set4.Opaque, set3.Opaque);

            var append5 = new Append<string>("thekey", null, null, Transcoder, OperationLifespanTimeout);
            Assert.Greater(append5.Opaque, set4.Opaque);

            var append6 = new Append<byte[]>("thekey", null, null, Transcoder, OperationLifespanTimeout);
            Assert.Greater(append6.Opaque, append5.Opaque);
        }

8. Example

View license
[Test]
        public void When_Bucket_Password_And_Username_Are_Used_ListBuckets_Succeeds()
        {
            var configuration = new ClientConfiguration
            {
                Servers = new List<Uri>
                {
                    new Uri(ConfigurationManager.AppSettings["bootstrapUrl"])
                }
            };
            using (var cluster = new Cluster(configuration))
            {
                var clusterManager = cluster.CreateManager("authenticated", "secret");
                var results = clusterManager.ListBuckets();
                Assert.Greater(results.Value.Count, 0);
            }
        }

9. Example

View license
[Test]
        public void Test_View_Query_Lots()
        {
            using (var bucket = _cluster.OpenBucket("beer-sample"))
            {
                var query = new ViewQuery().
                    Bucket("beer-sample").
                    From("beer", "brewery_beers");

                var result = bucket.Query<dynamic>(query);
                for (var i = 0; i < 10; i++)
                {
                    using (new OperationTimer())
                    {
                        Assert.Greater(result.TotalRows, 0);
                    }
                }
            }
        }

10. Example

View license
[Test]
        public void Test_ListBuckets()
        {
            var configuration = new ClientConfiguration
            {
                Servers = new List<Uri>
                {
                    new Uri(ConfigurationManager.AppSettings["bootstrapUrl"])
                }
            };
            using (var cluster = new Cluster(configuration))
            {
                var clusterManager = cluster.CreateManager("Administrator", "password");
                var results = clusterManager.ListBuckets();
                Assert.Greater(results.Value.Count, 0);
            }
        }

11. Example

View license
[Test]
        public void GetLifecycleUsingResourceOnlyReturnsRawResource()
        {
            var lifecycleName = Lifecycle1;

            var parameters = new List<CmdletParameter>
            {
                new CmdletParameter()
                {
                    Name = "resourceOnly"
                },
                new CmdletParameter()
                {
                    Name = "lifecycleName",
                    SingleValue = lifecycleName
                }
            };

            var powershell = new CmdletRunspace().CreatePowershellcmdlet(CmdletName, CmdletType, parameters);

            var results = powershell.Invoke<List<LifecycleResource>>();

            //If [results] has at least one item, It'll be of the resource type declared on the powershell.Invoke line, meaning the test passed
            Assert.Greater(results[0].Count, 0);
            ;
        }

12. Example

View license
[Test]
        public void GetProjectGroupUsingResourceOnlyReturnsRawResource()
        {
            var parameters = new List<CmdletParameter>
            {
                new CmdletParameter()
                {
                    Name = "resourceOnly"
                }
            };

            var powershell = new CmdletRunspace().CreatePowershellcmdlet(CmdletName, CmdletType, parameters);

            var results = powershell.Invoke<ProjectGroupResource>();

            //If [results] has at least one item, It'll be of the base resource type meaning the test was successful
            Assert.Greater(results.Count, 0);
            ;
        }

13. Example

Project: OctoPosh
Source File: GetOctopusFeedTests.cs
View license
[Test]
        public void GetFeedUsingResourceOnlyReturnsRawResource()
        {
            var feedName = Feed1;

            var parameters = new List<CmdletParameter>
            {
                new CmdletParameter()
                {
                    Name = "resourceOnly"
                },
                new CmdletParameter()
                {
                    Name = "FeedName",
                    SingleValue = feedName
                }
            };

            var powershell = new CmdletRunspace().CreatePowershellcmdlet(CmdletName, CmdletType, parameters);

            var results = powershell.Invoke<List<FeedResource>>();

            //If [results] has at least one item, It'll be of the resource type declared on the powershell.Invoke line, meaning the test passed
            Assert.Greater(results[0].Count, 0);
            ;
        }

14. Example

Project: OctoPosh
Source File: GetOctopusMachineTests.cs
View license
[Test]
        public void GetMachineUsingResourceOnlyReturnsRawResource()
        {
            //Creating a list of parameters only with the switch "-resourceOnly"
            var parameters = new List<CmdletParameter>
            {
                new CmdletParameter()
                {
                    Name = "resourceOnly"
                }
            };

            //Creating the Powershell cmdlet
            var powershell = new CmdletRunspace().CreatePowershellcmdlet(CmdletName, CmdletType, parameters);

            //Running the Powershell cmdlet
            var results = powershell.Invoke<List<MachineResource>>();

            //If [results] has at least one item, It'll be of the base resource type meaning the test was successful
            Assert.Greater(results[0].Count, 0);
            ;
        }

15. Example

Project: OctoPosh
Source File: GetOctopusTagSetTests.cs
View license
[Test]
        public void GetTagSetUsingResourceOnlyReturnsRawResource()
        {
            var tagSetName = TagSet1;

            var parameters = new List<CmdletParameter>
            {
                new CmdletParameter()
                {
                    Name = "resourceOnly"
                },
                new CmdletParameter()
                {
                    Name = "TagSetName",
                    SingleValue = tagSetName
                }
            };

            var powershell = new CmdletRunspace().CreatePowershellcmdlet(CmdletName, CmdletType, parameters);

            var results = powershell.Invoke<List<TagSetResource>>();

            //If [results] has at least one item, It'll be of the resource type declared on the powershell.Invoke line, meaning the test passed
            Assert.Greater(results[0].Count, 0);
            ;
        }

16. Example

Project: OctoPosh
Source File: GetOctopusProjectTests.cs
View license
[Test]
        public void GetProjectUsingResourceOnlyReturnsRawResource()
        {
            var parameters = new List<CmdletParameter>
            {
                new CmdletParameter()
                {
                    Name = "resourceOnly"
                }
            };

            var powershell = new CmdletRunspace().CreatePowershellcmdlet(CmdletName, CmdletType, parameters);

            var results = powershell.Invoke<List<ProjectResource>>();

            //If [results] has at least one item, It'll be of the base resource type meaning the test was successful
            Assert.Greater(results.Count, 0);
            ;
        }

17. Example

View license
[Test]
        public void GetEnvironmentUsingResourceOnlyReturnsRawResource()
        {
            var parameters = new List<CmdletParameter>
            {
                new CmdletParameter()
                {
                    Name = "resourceOnly"
                }
            };

            var powershell = new CmdletRunspace().CreatePowershellcmdlet(CmdletName, CmdletType, parameters);

            var results = powershell.Invoke<List<EnvironmentResource>>();

            //If [results] has at least one item, It'll be of the base resource type meaning the test was successful
            Assert.Greater(results.Count, 0);
            ;
        }

18. Example

View license
[Test]
        public void GetDashboardWithoutParametersReturnsValues()
        {
            var powershell = new CmdletRunspace().CreatePowershellcmdlet(CmdletName, CmdletType);
            var results = powershell.Invoke<OutputOctopusDashboardEntry>();

            Assert.Greater(results.Count, 0);
        }

19. Example

Project: OctoPosh
Source File: GetOctopusTeamTests.cs
View license
[Test]
        public void GetTeamUsingResourceOnlyReturnsRawResource()
        {
            var teamName = Team1;

            var parameters = new List<CmdletParameter>
            {
                new CmdletParameter()
                {
                    Name = "resourceOnly"
                },
                new CmdletParameter()
                {
                    Name = "TeamName",
                    SingleValue = teamName
                }
            };

            var powershell = new CmdletRunspace().CreatePowershellcmdlet(CmdletName, CmdletType, parameters);

            var results = powershell.Invoke<List<TeamResource>>();

            //If [results] has at least one item, It'll be of the resource type declared on the powershell.Invoke line, meaning the test passed
            Assert.Greater(results[0].Count, 0);
            ;
        }

20. Example

Project: OctoPosh
Source File: GetOctopusChannelTests.cs
View license
[Test]
        public void GetChannelUsingResourceOnlyReturnsRawResource()
        {
            var name = Channel1;
            var projectName = Project1;

            var parameters = new List<CmdletParameter>
            {
                new CmdletParameter()
                {
                    Name = "resourceOnly"
                },
                new CmdletParameter()
                {
                    Name = "ChannelName",
                    SingleValue = name
                },
                new CmdletParameter()
                {
                    Name = "ProjectName",
                    SingleValue = projectName
                }
            };

            var powershell = new CmdletRunspace().CreatePowershellcmdlet(CmdletName, CmdletType, parameters);

            var results = powershell.Invoke<List<ChannelResource>>();

            //If [results] has at least one item, It'll be of the resource type declared on the powershell.Invoke line, meaning the test passed
            Assert.Greater(results[0].Count, 0);
            ;
        }

21. Example

Project: OctoPosh
Source File: GetOctopusTenantTests.cs
View license
[Test]
        public void GetTenantUsingResourceOnlyReturnsRawResource()
        {
            var tenantName = Tenant1;

            var parameters = new List<CmdletParameter>
            {
                new CmdletParameter()
                {
                    Name = "resourceOnly"
                },
                new CmdletParameter()
                {
                    Name = "TenantName",
                    SingleValue = tenantName
                }
            };

            var powershell = new CmdletRunspace().CreatePowershellcmdlet(CmdletName, CmdletType, parameters);

            var results = powershell.Invoke<List<TenantResource>>();

            //If [results] has at least one item, It'll be of the resource type declared on the powershell.Invoke line, meaning the test passed
            Assert.Greater(results[0].Count, 0);
            ;
        }

22. Example

Project: WinRT.NET
Source File: AsyncInfoTests.cs
View license
[Test]
		public void GetNextInfoId()
		{
			uint id = AsyncInfo.GetNextInfoId();
			Assert.Greater (AsyncInfo.GetNextInfoId(), id);
		}

23. Example

Project: SeleniumBasic
Source File: TS_Window.cs
View license
[TestCase]
        public void ShouldDisplayMaximized() {
            var win = driver.Window;
            win.SetSize(800, 600);

            win.Maximize();
            var size = win.Size();
            A.Greater(size.Width, 900);
            A.Greater(size.Height, 700);
        }

24. Example

Project: tdd-toolkit
Source File: AnySpecification.cs
View license
[Test]
    public void ShouldAllowGeneratingIntegersFromSequence()
    {
      var value1 = Any.IntegerFromSequence(startingValue: 12, step: 112);
      var value2 = Any.IntegerFromSequence(startingValue: 12, step: 112);

      XAssert.Equal(value1, value2 - 112);
      Assert.Greater(value1, 12);
    }

25. Example

View license
[Test]
        public void CompareTo_WithMoreTicks_IsGreater()
        {
            Assert.Greater(one.CompareTo(negativeFiftyMillion), 0, "1 > -50,000,000");
            Assert.Greater(threeMillion.CompareTo(one), 0, "3,000,000 > 1");
            Assert.Greater(negativeOne.CompareTo(negativeFiftyMillion), 0, "-1 > -50,000,000");
            Assert.Greater(LocalInstant.MaxValue.CompareTo(LocalInstant.MinValue), 0, "MaxValue > MinValue");
        }

26. Example

View license
public static IComparable ShouldBeGreaterThan(this IComparable arg1, IComparable arg2)
        {
            Assert.Greater(arg1, arg2);
            return arg2;
        }

27. Example

Project: BenchmarkIt
Source File: TestBenchmark.cs
View license
[Test()]
        public void TestHours()
        {
            var result = Benchmark
                .This("", () => { })
                .For(0).Hours();

            Assert.Greater(result[0].Stopwatch.ElapsedTicks, 0);
        }

28. Example

Project: BenchmarkIt
Source File: TestBenchmark.cs
View license
[Test()]
        public void TestMinutes()
        {
            var result = Benchmark
                .This("", () => { })
                .For(0).Minutes();

            Assert.Greater(result[0].Stopwatch.ElapsedTicks, 0);
        }

29. Example

Project: GribApi.NET
Source File: Files.cs
View license
[Test, Timeout(5000)]
		public void TestSteographic()
		{
			using (GribFile file = new GribFile(Settings.STEREO)) {
				GribMessage msg = file.First();
				Assert.Greater(msg.ValuesCount, 1);
				foreach (GeoSpatialValue gs in msg.GeoSpatialValues) {
					Assert.Greater(gs.Latitude, 15);
				}
			}
		}

30. Example

Project: msbuildtasks
Source File: DeleteTreeTest.cs
View license
[Test]
        public void MatchDirectoriesInnerRelative()
        {
            var path = DeleteTree.MatchDirectories(@"..\..\..\**\obj");
            Assert.Greater(path.Count, 0);
        }

31. Example

Project: msbuildtasks
Source File: DeleteTreeTest.cs
View license
[Test]
        public void MatchDirectoriesRelativeWildCard()
        {
            var path = DeleteTree.MatchDirectories(@"..\..\..\MSBuild.Community.*\**\obj");
            Assert.Greater(path.Count, 0);

            path = DeleteTree.MatchDirectories(@"..\..\..\MSBuild.*.Tests\**\obj\**");
            Assert.Greater(path.Count, 0);
        }

32. Example

Project: msbuildtasks
Source File: DeleteTreeTest.cs
View license
[Test]
        public void MatchDirectoriesInnerAndOuterRelative()
        {
            var path = DeleteTree.MatchDirectories(@"..\..\..\**\obj\**");
            Assert.Greater(path.Count, 0);
        }

33. Example

Project: msbuildtasks
Source File: DeleteTreeTest.cs
View license
[Test]
        public void MatchDirectoriesRelative()
        {
            var path = DeleteTree.MatchDirectories(@"..\..\..\**");
            Assert.Greater(path.Count, 0);
        }

34. Example

Project: OpenGL.Net
Source File: Plane.cs
View license
[Test]
		public void TestProjectionFrustum()
		{
			PerspectiveProjectionMatrix projectionMatrix = new PerspectiveProjectionMatrix(90.0f, 1.0f, 1.0f, 10.0f);
			ModelMatrix modelMatrix = new ModelMatrix();

			IMatrix4x4 frustumMatrix = projectionMatrix * modelMatrix;

			Plane planeL = Plane.GetFrustumLeftPlane(frustumMatrix);
			Plane planeR = Plane.GetFrustumRightPlane(frustumMatrix);
			Plane planeB = Plane.GetFrustumBottomPlane(frustumMatrix);
			Plane planeT = Plane.GetFrustumTopPlane(frustumMatrix);

			Plane planeN = Plane.GetFrustumNearPlane(frustumMatrix);
			Assert.Greater(planeN.GetDistance(new Vertex3f(0.0f, 0.0f, -5.0f)), 0.0f);

			Plane planeF = Plane.GetFrustumFarPlane(frustumMatrix);
			Assert.Greater(planeF.GetDistance(new Vertex3f(0.0f, 0.0f, -5.0f)), 0.0f);
		}

35. Example

Project: machine
Source File: FileSystemTests.cs
View license
[Test]
    public void GetFileProperties_IsAFile_HasProperties()
    {
      FileProperties actual = _target.GetFileProperties(typeof(FileSystem).Assembly.Location);
      Assert.Greater(actual.Length, 0);
    }

36. Example

Project: MarcelloDB
Source File: RecordManagerTest.cs
View license
[Test]
        public void Append_Record_Assigns_Address()
        {
            var record = _recordManager.AppendRecord(new byte[0], _allocationStrategy);
            Assert.Greater(record.Header.Address, 0);
        }

37. Example

View license
[TestFixtureSetUp]
        public void CreateStub()
        {
            string fieldValue = "test /n ..... /n //View Source file for more details /n }

38. Example

View license
[TestFixtureSetUp]
        public void CreateStub()
        {
            string fieldValue = "test /n ..... /n //View Source file for more details /n }

39. Example

View license
[TestFixtureSetUp]
        public void CreateStub()
        {
            string name = "Target";
            string contentTypeAlias = "TestType";
            string contentTypeName = "Test Type";

            var unitOfWork = Global.CreateUnitOfWork();
            var repoFactory = new RepositoryFactory();
            _contentService = new ContentService(unitOfWork, repoFactory);
            var contentTypeService = new ContentTypeService(unitOfWork, repoFactory,
                                                            new ContentService(unitOfWork),
                                                            new MediaService(unitOfWork, repoFactory));
            
            var contentType = new ContentType(-1);
            contentType.Name = contentTypeName;
            contentType.Alias = contentTypeAlias;
            contentType.Thumbnail = string.Empty;
            contentTypeService.Save(contentType);
            Assert.Greater(contentType.Id, 0);

            var content = new Content(name, -1, contentType);
            content.Key = new Guid("{263768E1-E958-4B00-BB00-191CC33A3F48}");
            _contentService.Save(content);
        }

40. Example

View license
[TestFixtureSetUp]
        public void CreateStub()
        {
            string name = "Target";
            string contentTypeAlias = "TestType";
            string contentTypeName = "Test Type";

            _unitOfWork = Global.CreateUnitOfWork();
            _repoFactory = new RepositoryFactory();
            var contentService = new ContentService(_unitOfWork, _repoFactory);
            var contentTypeService = new ContentTypeService(_unitOfWork, _repoFactory,
                                                            new ContentService(_unitOfWork),
                                                            new MediaService(_unitOfWork, _repoFactory));

            var contentType = new ContentType(-1);
            contentType.Name = contentTypeName;
            contentType.Alias = contentTypeAlias;
            contentType.Thumbnail = string.Empty;
            contentTypeService.Save(contentType);
            Assert.Greater(contentType.Id, 0);

            var parentContent = new Content(name, -1, contentType);
            parentContent.Key = new Guid("{4172C94F-52C1-4301-9CDA-FD2142496C95}");
            contentService.Save(parentContent);

            var content = new Content(name, parentContent.Id, contentType);
            content.Key = new Guid("{C382AE57-D325-4357-A32A-0A959BBD4101}");
            contentService.Save(content);
        }

41. Example

View license
[TestFixtureSetUp]
        public void CreateStub()
        {
            string name = "Target";
            string contentTypeAlias = "TestType";
            string contentTypeName = "Test Type";

            var unitOfWork = Global.CreateUnitOfWork();
            var repoFactory = new RepositoryFactory();
            _contentService = new ContentService(unitOfWork, repoFactory);
            var contentTypeService = new ContentTypeService(unitOfWork, repoFactory,
                                                            new ContentService(unitOfWork),
                                                            new MediaService(unitOfWork, repoFactory));

            var contentType = new ContentType(-1);
            contentType.Name = contentTypeName;
            contentType.Alias = contentTypeAlias;
            contentType.Thumbnail = string.Empty;
            contentTypeService.Save(contentType);
            Assert.Greater(contentType.Id, 0);

            var parentContent = new Content(name, -1, contentType);
            parentContent.Key = new Guid("{373D1D1C-BD0D-4A8C-9A67-1D513815FE10}");
            _contentService.Save(parentContent);

            var content = new Content(name, parentContent.Id, contentType);
            content.Key = new Guid("{3F34475B-D744-40E9-BC30-5D33249FA9FE}");
            _contentService.Save(content);
        }

42. Example

View license
[TestFixtureSetUp]
        public void CreateStub()
        {
            bool fieldValue = false;
 /n ..... /n //View Source file for more details /n }

43. Example

View license
[TestFixtureSetUp]
        public void CreateStub()
        {
            string name = "EmptyItem";/n ..... /n //View Source file for more details /n }

44. Example

View license
[TestFixtureSetUp]
        public void CreateStub()
        {
            string name = "Target";
            string contentTypeAlias = "TestType";
            string contentTypeName = "Test Type";

            _unitOfWork = Global.CreateUnitOfWork();
            _repoFactory = new RepositoryFactory();
            var contentService = new ContentService(_unitOfWork, _repoFactory);
            var contentTypeService = new ContentTypeService(_unitOfWork, _repoFactory,
                                                            new ContentService(_unitOfWork),
                                                            new MediaService(_unitOfWork, _repoFactory));

            var contentType = new ContentType(-1);
            contentType.Name = contentTypeName;
            contentType.Alias = contentTypeAlias;
            contentType.Thumbnail = string.Empty;
            contentTypeService.Save(contentType);
            Assert.Greater(contentType.Id, 0);

            var content = new Content(name, -1, contentType);
            content.Key = new Guid("{FB6A8073-48B4-4B85-B80C-09CBDECC27C9}");
            contentService.Save(content);
            contentService.Publish(content);
        }

45. Example

View license
[Test]
        public void ItRetrievesPlayerGameResultsForEachPlayedGame()
        {
            Assert.Greater(_gameDefinitionSummary.PlayedGames[0].PlayerGameResults.Count, 0);
        }

46. Example

Project: nexmo-dotnet
Source File: NumberTest.cs
View license
[Test]
        public void should_buy_then_update_finally_cancel_number()
        {
            // find a number to buy
            const string country = "US";
            var results = Number.Search(new Number.SearchRequest
            {
                country = country
            });
            Assert.Greater(results.count, 1);
            var firstNumber = results.numbers.First().msisdn;

            // buy it
            Number.Buy(country, firstNumber);

            // try to update
            Number.Update(new Number.NumberUpdateCommand
            {
                country = country,
                msisdn = firstNumber,
                moHttpUrl = "https://test.test.com/mo",
                moSmppSysType = "inbound"
            });

            // cancel it
            Number.Cancel(country, firstNumber);
        }

47. Example

Project: nhibernate-core
Source File: LinqQuerySamples.cs
View license
[Category("WHERE")]
		[Test(Description = "This sample uses First to select an Order with freight greater than 10.00.")]
		public void DLinq8()
		{
			Order ord = db.Orders.First(o => o.Freight > 10.00M);
			Assert.Greater(ord.Freight, 10.00M);
		}

48. Example

Project: nhibernate-core
Source File: SumTests.cs
View license
[Test]
		public void SumNullableDecimal()
		{
			decimal? total = db.Orders.Sum(ol => ol.Freight);
			Assert.Greater(total, 0);
		}

49. Example

Project: nhibernate-core
Source File: OrderByTests.cs
View license
[Test]
		public void ComplexDescendingOrderByClause()
		{
			var query = from c in db.Customers
						where c.Address.Country == "Belgium"
						orderby c.Address.Country descending, c.Address.City descending
						select c.Address.City;

			var ids = query.ToList();

			if (ids.Count > 1)
			{
				Assert.Greater(ids[0], ids[1]);
			}
		}

50. Example

Project: nhibernate-core
Source File: OrderByTests.cs
View license
[Test]
		public void ComplexAscendingOrderByClause()
		{
			var query = from c in db.Customers
						where c.Address.Country == "Belgium"
						orderby c.Address.Country, c.Address.City
						select c.Address.City;

			var ids = query.ToList();

			if (ids.Count > 1)
			{
				Assert.Greater(ids[1], ids[0]);
			}
		}