NUnit.Framework.Assert.NotNull(object)

Here are the examples of the csharp api class NUnit.Framework.Assert.NotNull(object) 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: TestErrorToolbar.cs
View license
[Test]
        public void NewStripButton()
        {
            Assert.NotNull(ErrorToolbar.NewStripButton(true, "text", new Bitmap(10, 10), null));
        }

2. Example

View license
[Test]
        public void AllViewElementsAreWrapped()
        {
            ConfigurationEditorDialog view = new ConfigurationEditorDialog();

            Assert.NotNull(view.AddCommand);
            Assert.NotNull(view.RemoveCommand);
            Assert.NotNull(view.RenameCommand);
            Assert.NotNull(view.ActiveCommand);

            Assert.NotNull(view.ConfigList);
        }

3. Example

Project: ContinuousTests
Source File: TestErrorToolbar.cs
View license
[Test]
        public void NewStripButton()
        {
            Assert.NotNull(ErrorToolbar.NewStripButton(true, "text", new Bitmap(10, 10), null));
        }

4. Example

Project: FastString
Source File: CharInfoSmokeTest.cs
View license
[Test]
		public void NearTop()
		{
			Assert.NotNull(CharInfo.For(0x100000));
			Assert.NotNull(CharInfo.For(0x10FFFD));
		}

5. Example

Project: Dnn.Platform
Source File: DDRMenuTests.cs
View license
private IWebApiConnector CreateNewPage(int templateTabId, out int tabId)
        {
            var pagesExecuter = new PagesExecuter { Connector = WebApiTestHelper.LoginHost() };

            var pageSettingsBuilder = new PageSettingsBuilder();
            pageSettingsBuilder.WithPermission(new TabPermissionsBuilder().Build());

            if (templateTabId > 0)
            {
                pageSettingsBuilder.WithTemplateTabId(templateTabId);

                var modules = DatabaseHelper.ExecuteQuery<CopyModuleItem>($"SELECT ModuleId, ModuleTitle FROM {{objectQualifier}}TabModules WHERE TabId = {templateTabId}");
                pageSettingsBuilder.WithCopyModules(modules.ToList());
            }

            var pageDetail = pagesExecuter.SavePageDetails(pageSettingsBuilder.Build());

            Assert.NotNull(pageDetail.Page, "The system must create the page and return its details in the response");

            tabId = (int)pageDetail.Page.id;

            return pagesExecuter.Connector;
        }

6. Example

Project: DropNetRT
Source File: ClientUserTests.cs
View license
[Test]
        public async Task Given_A_Clent_Get_User_Account_Infromation()
        {
            var client = new DropNetClient(AppKey, AppSecret, UserToken, UserSecret);
            var accountInfromation = await client.AccountInfo();

            Assert.NotNull(accountInfromation);
            Assert.NotNull(accountInfromation.QuotaInfo);
        }

7. Example

Project: DropNetRT
Source File: ClientUserTests.cs
View license
[Test]
        [Explicit("This test require user input.")]
        public async Task Get_Access_Token_Test()
        {
            var client = new DropNetClient(AppKey, AppSecret);

            var userToken = await client.GetRequestToken();
            
            //Open the url in browser and login
            string url = client.BuildAuthorizeUrl(userToken, "http://cloudyboxapp.com");
            var user = await client.GetAccessToken();

            Assert.NotNull(user);
        }

8. Example

Project: DropNetRT
Source File: ClientUserTests.cs
View license
[Test]
        public async Task When_Token_Requested_Then_User_Token_Is_Returned()
        {   
            var client = new DropNetClient(AppKey, AppSecret);
            var userToken = await client.GetRequestToken();
            Assert.NotNull(userToken);
        }

9. Example

Project: Winium.Desktop
Source File: MenuCommandsTests.cs
View license
[Test]
        public void FindMenuItem()
        {
            var menuItem = this.Driver.FindMenuItem(this.MenuElement, "Level1$MultiLevel2$Level3");
            Assert.NotNull(menuItem);
        }

10. Example

Project: Winium.Desktop
Source File: FindTests.cs
View license
[Test]
        public void FindElementById()
        {
            var element = this.MainWindow;
            Assert.NotNull(element);
        }

11. Example

View license
[Test]
        public void Should_be_able_to_list_parameters()
        {
            var parameters = managementClient.GetParameters();
            Assert.NotNull(parameters);
        }

12. Example

Project: nesper
Source File: TestDeployAdmin.cs
View license
[Test]
        public void TestFlagUndeployNoDestroy() {
            _epService.EPAdministrator.Configuration.AddEventType<SupportBean>();
    
            var resultOne = _deploymentAdmin.ParseDeploy("@Name('S0') select * from SupportBean");
            var resultTwo = _deploymentAdmin.ParseDeploy("@Name('S1') select * from SupportBean");
    
            var options = new UndeploymentOptions();
            options.IsDestroyStatements = false;
            _deploymentAdmin.UndeployRemove(resultOne.DeploymentId, options);
            Assert.NotNull(_epService.EPAdministrator.GetStatement("S0"));
    
            _deploymentAdmin.Undeploy(resultTwo.DeploymentId, options);
            Assert.NotNull(_epService.EPAdministrator.GetStatement("S1"));
        }

13. Example

View license
[Test]
        public void TestCompileToOM()
        {
            var stmtText = "select * from " + typeof(SupportBean).FullName;
            var model = _epService.EPAdministrator.CompileEPL(stmtText);
            SerializableObjectCopier.Copy(model);
            Assert.NotNull(model);
        }

14. Example

Project: nesper
Source File: TestVariantStreamDefault.cs
View license
[Test]
        public void TestDynamicMapType()
        {
            IDictionary<String, Object> types = new Dictionary<String, Object>();
            types["someprop"] = typeof(string);

            _epService.EPAdministrator.Configuration.AddEventType("MyEvent", types);
            _epService.EPAdministrator.Configuration.AddEventType("MySecondEvent", types);

            ConfigurationVariantStream variant = new ConfigurationVariantStream();
            variant.AddEventTypeName("MyEvent");
            variant.AddEventTypeName("MySecondEvent");
            _epService.EPAdministrator.Configuration.AddVariantStream("MyVariant", variant);

            _epService.EPAdministrator.CreateEPL("insert into MyVariant select * from MyEvent");
            _epService.EPAdministrator.CreateEPL("insert into MyVariant select * from MySecondEvent");

            EPStatement stmt = _epService.EPAdministrator.CreateEPL("select * from MyVariant");
            stmt.Events += _listenerOne.Update;
            _epService.EPRuntime.SendEvent(new Dictionary<string, object>(), "MyEvent");
            Assert.NotNull(_listenerOne.AssertOneGetNewAndReset());
            _epService.EPRuntime.SendEvent(new Dictionary<string, object>(), "MySecondEvent");
            Assert.NotNull(_listenerOne.AssertOneGetNewAndReset());
        }

15. Example

Project: GeneticSharp
Source File: AutoConfigTest.cs
View license
[Test()]
        public void Evolve_ManyGenerations_Fast()
        {
            var selection = new EliteSelection();
            var crossover = new UniformCrossover();
            var mutation = new UniformMutation(true);
            var chromosome = new AutoConfigChromosome();
            var targetChromosome = new TspChromosome(10);
            var targetFitness = new TspFitness(10, 0, 100, 0, 100);            
            var fitness = new AutoConfigFitness(targetFitness, targetChromosome);
            fitness.PopulationMinSize = 20;
            fitness.PopulationMaxSize = 20;
            fitness.Termination = new TimeEvolvingTermination(TimeSpan.FromSeconds(5));
            
            var population = new Population(10, 10, chromosome);

            var ga = new GeneticAlgorithm(population, fitness, selection, crossover, mutation);
            
            ga.TaskExecutor = new SmartThreadPoolTaskExecutor()
            {
                MinThreads = 10,
                MaxThreads = 20
            };        

            ga.Termination = new GenerationNumberTermination(10);
            ga.Start();

            Assert.NotNull(ga.BestChromosome);            
        }

16. Example

Project: GeneticSharp
Source File: GhostwriterTest.cs
View license
[Test()]
        public void Evolve_ManyGenerations_Fast()
        {
            var selection = new EliteSelection();
            var crossover = new UniformCrossover();
            var mutation = new UniformMutation(true);
			var chromosome = new GhostwriterChromosome(4, new string[] { "The", "C#", "Genetic", "Algorithm", "library" });
			var fitness = new GhostwriterFitness((t) => t.Length);
            
            var population = new Population(10, 10, chromosome);
            var ga = new GeneticAlgorithm(population, fitness, selection, crossover, mutation);
            ga.Termination = new GenerationNumberTermination(5);
            ga.Start();

            Assert.NotNull(ga.BestChromosome);            
        }

17. Example

View license
[Test]
        public  void Should_be_able_to_create_instance()
        {
            Assert.NotNull(sut);
        }

18. Example

View license
[Test]
    [Category("Small")]
    public void TestSignature() {
      MockAppConfig config = new MockAppConfig();
      Assert.NotNull(config.Signature);
    }

19. Example

View license
[Test]
        public void TestConstructor()
        {
            Dependency dep = new Dependency("test", "artifact1", "1.0");
            Assert.NotNull(dep);
        }

20. Example

Project: tdd-toolkit
Source File: AnySpecification.cs
View license
[Test]
    public void ShouldSupportActions()
    {
      //WHEN
      var action = Any.Instance<Action<ISimple, string>>();

      //THEN
      Assert.NotNull(action);
    }

21. Example

Project: tdd-toolkit
Source File: AnySpecification.cs
View license
[Test]
    public void ShouldFillPropertiesWhenCreatingDataStructures()
    {
      //WHEN
      var instance = Any.Instance<ConcreteDataStructure>();

      //THEN
      Assert.NotNull(instance.Data);
      Assert.NotNull(instance._field);
      Assert.NotNull(instance.Data.Text);
    }

22. Example

View license
[Test]
    public void ShouldReturnNonNullImplementationsOfInnerObjects()
    {
      //GIVEN
      var instance = Any.SubstituteOf<RecursiveInterface>();

      //WHEN
      var result = instance.Nested;

      //THEN
      Assert.NotNull(result);
    }

23. Example

Project: tdd-toolkit
Source File: AnySpecification.cs
View license
[Test]
    public void ShouldCreateNonNullUri()
    {
      Assert.NotNull(Any.Uri());
    }

24. Example

Project: NodaTime
Source File: ZoneYearOffsetTest.cs
View license
[Test]
        public void Construct_ValidTickOfDay()
        {
            int delta = (Offset.MaxValue.TotalMilliseconds / 100);
            for (int millisecond = 0; millisecond < Offset.MaxValue.TotalMilliseconds; millisecond += delta)
            {
                var tickOfDay = Offset.FromMilliseconds(millisecond);
                Assert.NotNull(new ZoneYearOffset(TransitionMode.Standard, 1, 1, 0, true, tickOfDay), "Tick of Day " + tickOfDay);
            }
        }

25. Example

Project: NodaTime
Source File: ZoneYearOffsetTest.cs
View license
[Test]
        public void Construct_ValidMonths()
        {
            for (int month = 1; month <= 12; month++)
            {
                Assert.NotNull(new ZoneYearOffset(TransitionMode.Standard, month, 1, 1, true, Offset.Zero), "Month " + month);
            }
        }

26. Example

Project: NodaTime
Source File: NodaCultureInfoTest.cs
View license
[Test]
        public void TestNodaFormatInfo_get()
        {
            var actual = NodaCultureInfo.InvariantCulture.NodaFormatInfo;
            Assert.NotNull(actual);
        }

27. Example

Project: NodaTime
Source File: ZoneYearOffsetTest.cs
View license
[Test]
        public void Construct_ValidDaysOfWeek()
        {
            for (int dayOfWeek = 0; dayOfWeek <= 7; dayOfWeek++)
            {
                Assert.NotNull(new ZoneYearOffset(TransitionMode.Standard, 1, 1, dayOfWeek, true, Offset.Zero), "Day of week " + dayOfWeek);
            }
        }

28. Example

Project: NodaTime
Source File: NodaCultureInfoTest.cs
View license
[Test]
        public void TestGetFormat()
        {
            var info = new NodaCultureInfo("en-US");
            var nodaFormatInfo = info.GetFormat(typeof(NodaFormatInfo));
            Assert.NotNull(nodaFormatInfo, "GetFormat supoprts NodaFormatInfo");
            var numberFormatInfo = info.GetFormat(typeof(NumberFormatInfo));
            Assert.NotNull(numberFormatInfo, "NodaCultureInfo passes GetFormat() to underlying CultureInfo");
        }

29. Example

Project: NodaTime
Source File: ZoneYearOffsetTest.cs
View license
[Test]
        public void Construct_ValidDays()
        {
            for (int day = 1; day <= 31; day++)
            {
                Assert.NotNull(new ZoneYearOffset(TransitionMode.Standard, 1, day, 1, true, Offset.Zero), "Day " + day);
            }
            for (int day = -1; day >= -31; day--)
            {
                Assert.NotNull(new ZoneYearOffset(TransitionMode.Standard, 1, day, 1, true, Offset.Zero), "Day " + day);
            }
        }

30. Example

Project: CacheCow
Source File: Steps.cs
View license
[Then(@"Get an unsuccessful response")]
        public void ThenGetAnUnsuccessfulResponse()
        {
            var ex = ScenarioContext.Current[Keys.Exception];
            Assert.NotNull(ex);
        }

31. Example

View license
[Test]
        public virtual void TestXmlParserWithReader()
        {
            var clientConfig = XmlClientConfigBuilder.Build(new StringReader(Resources.hazelcast_config_full));
            Assert.NotNull(clientConfig);
        }

32. Example

View license
[Test]
        public virtual void TestXmlParserWithConfigFile()
        {
            var clientConfig =
                XmlClientConfigBuilder.Build(@"..\..\..\Hazelcast.Net\Resources\hazelcast-client-full.xml");

            Assert.NotNull(clientConfig);
        }

33. Example

View license
[Test]
        public virtual void TestXmlParserDefault()
        {
            var clientConfig = XmlClientConfigBuilder.Build();

            Assert.NotNull(clientConfig);
        }

34. Example

View license
public virtual void TestConfig()
        {
            var config = new ClientConfig();
            var networkConfig = new ClientNetworkConfig();
            networkConfig.SetAddresses(new[] {"127.0.0.1:5701"});
            config.SetNetworkConfig(networkConfig);
            config.SetGroupConfig(new GroupConfig("mike-local", "password"));
            var _client = HazelcastClient.NewHazelcastClient(config);


            Assert.NotNull(_client);

            _client.Shutdown();
        }

35. Example

Project: helix-toolkit
Source File: MeshBuilderTests.cs
View license
[Test]
        public void A_B_C()
        {
            var mb = new MeshBuilder();
            Assert.NotNull(mb);
        }

36. Example

Project: mini-web-deploy
Source File: CreateSiteTests.cs
View license
[Test]
        public void NewSiteIsCreated() 
        {
            Assert.NotNull(new ServerManager().Sites.SingleOrDefault(x => x.Name == SiteName));
        }

37. Example

Project: mini-web-deploy
Source File: AndFlagIsNotSet.cs
View license
[Test]
        public void ExistingSiteIsNotDeleted()
        {
            Assert.NotNull(new ServerManager().Sites.SingleOrDefault(x => x.Name == SiteName));
        }

38. Example

View license
[Test]
        public void The_DynamicDictionary_Should_Be_Castable_To_An_IDictionary_Of_String_Object()
        {
            dynamic obj = new DynamicDictionary();

            var dictionary = (IDictionary<string, object>)obj;

            Assert.NotNull( dictionary );
        }

39. Example

View license
[Test]
        public void Should_Create_A_DbConnection_When_Supplied_A_ConnectionString_And_A_Provider_Name()
        {
            // Arrange
            string connectionString = ConfigurationManager.ConnectionStrings[ ConnectionStringsNames.MySqlConnectionString ].ConnectionString;

            const string dbProviderFactoryInvariantName = "MySql.Data.MySqlClient";

            // Act
            var dbConnection = Sequelocity.CreateDbConnection( connectionString, dbProviderFactoryInvariantName );

            // Assert
            Assert.NotNull( dbConnection );

            // Cleanup
            dbConnection.Dispose();
        }

40. Example

View license
[Test]
        public void Should_Create_A_DbConnection_When_Passed_A_Connection_String_Name()
        {
            // Arrange
            string connectionStringName = ConnectionStringsNames.SqliteInMemoryDatabaseConnectionString;
            
            // Act
            var dbConnection = Sequelocity.CreateDbConnection( connectionStringName );

            // Assert
            Assert.NotNull( dbConnection );

            // Cleanup
            dbConnection.Dispose();
        }

41. Example

View license
[Test]
        public void Should_Create_A_DbConnection_When_Supplied_A_ConnectionString_And_A_Provider_Name()
        {
            // Arrange
            string connectionString = ConfigurationManager.ConnectionStrings[ConnectionStringsNames.PostgreSQLConnectionString].ConnectionString;

            const string dbProviderFactoryInvariantName = "Npgsql";

            // Act
            var dbConnection = Sequelocity.CreateDbConnection(connectionString, dbProviderFactoryInvariantName);

            // Assert
            Assert.NotNull(dbConnection);

            // Cleanup
            dbConnection.Dispose();
        }

42. Example

View license
[Test]
        public void Should_Associate_The_DbTransaction_With_The_DatabaseCommand()
        {
            // Arrange
            var databaseCommand = Sequelocity.GetDatabaseCommand( ConnectionStringsNames.SqliteInMemoryDatabaseConnectionString );

            // Act
            var transaction = databaseCommand.BeginTransaction();

            // Assert
            Assert.NotNull( databaseCommand.DbCommand.Transaction == transaction );
        }

43. Example

View license
[Test]
        public void Should_Create_A_DbConnection_When_Supplied_A_ConnectionString_Name()
        {
            // Arrange
            string connectionString = ConnectionStringsNames.MySqlConnectionString;
            
            // Act
            var dbConnection = Sequelocity.CreateDbConnection( connectionString );

            // Assert
            Assert.NotNull( dbConnection );

            // Cleanup
            dbConnection.Dispose();
        }

44. Example

View license
[Test]
        public void Should_Create_A_DbConnection_When_Passed_A_Connection_String_And_Provider_Name()
        {
            // Arrange
            string connectionStringName = ConfigurationManager.ConnectionStrings[ ConnectionStringsNames.SqliteInMemoryDatabaseConnectionString ].ConnectionString;

            const string dbProviderFactoryInvariantName = "System.Data.SQLite";

            // Act
            var dbConnection = Sequelocity.CreateDbConnection( connectionStringName, dbProviderFactoryInvariantName );

            // Assert
            Assert.NotNull( dbConnection );

            // Cleanup
            dbConnection.Dispose();
        }

45. Example

View license
[Test]
        public void Should_Create_A_DbConnection_When_Passed_A_Connection_String_And_Provider_Name()
        {
            // Arrange
            string connectionString = ConfigurationManager.ConnectionStrings[ ConnectionStringsNames.SqlServerConnectionString ].ConnectionString;

            const string dbProviderFactoryInvariantName = "System.Data.SqlClient";

            // Act
            var dbConnection = Sequelocity.CreateDbConnection( connectionString, dbProviderFactoryInvariantName );

            // Assert
            Assert.NotNull( dbConnection );

            // Cleanup
            dbConnection.Dispose();
        }

46. Example

View license
[Test]
		public void Should_Associate_The_DbTransaction_With_The_DatabaseCommand()
		{
			// Arrange
			var databaseCommand = Sequelocity.GetDatabaseCommand( ConnectionStringsNames.SqlServerConnectionString );

			// Act
			var transaction = databaseCommand.BeginTransaction();

			// Assert
			Assert.NotNull( databaseCommand.DbCommand.Transaction == transaction );
		}

47. Example

View license
[Test]
        public void Should_Associate_The_DbTransaction_With_The_DatabaseCommand()
        {
            // Arrange
            var databaseCommand = Sequelocity.GetDatabaseCommand( ConnectionStringsNames.MySqlConnectionString );

            // Act
            var transaction = databaseCommand.BeginTransaction();

            // Assert
            Assert.NotNull( databaseCommand.DbCommand.Transaction == transaction );
        }

48. Example

View license
[Test]
        public void Should_Associate_The_DbTransaction_With_The_DatabaseCommand()
        {
            // Arrange
            var databaseCommand = Sequelocity.GetDatabaseCommand(ConnectionStringsNames.PostgreSQLConnectionString);

            // Act
            var transaction = databaseCommand.BeginTransaction();

            // Assert
            Assert.NotNull(databaseCommand.DbCommand.Transaction == transaction);
        }

49. Example

View license
[Test]
        public void Should_Create_A_DbConnection_When_Supplied_A_ConnectionString_Name()
        {
            // Arrange
            string connectionString = ConnectionStringsNames.PostgreSQLConnectionString;

            // Act
            var dbConnection = Sequelocity.CreateDbConnection(connectionString);

            // Assert
            Assert.NotNull(dbConnection);

            // Cleanup
            dbConnection.Dispose();
        }

50. Example

View license
[Test]
        public void Should_Create_A_DbConnection_When_Passed_A_Connection_StringName()
        {
            // Arrange
            string connectionStringName = ConnectionStringsNames.SqlServerConnectionString;
            
            // Act
            var dbConnection = Sequelocity.CreateDbConnection( connectionStringName );

            // Assert
            Assert.NotNull( dbConnection );

            // Cleanup
            dbConnection.Dispose();
        }