NUnit.Framework.Assert.IsNull(object)

Here are the examples of the csharp api class NUnit.Framework.Assert.IsNull(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: TestNodeTests.cs
View license
[Test]
		public void ConstructFromTestCase()
		{
			TestNode test = new TestNode( testCase1 );
			Assert.IsNull( test.Tests );
		}

2. Example

View license
[Test]
		public void IsNull()
		{
			Assert.IsNull(null);
		}

3. Example

View license
[Test]
        public void Should_return_null_when_no_solution_present_return_null()
        {
            _configuration.Stub(c => c.WatchPath).Return("NotExisting.sln");
            _fs.Stub(c => c.FileExists("NotExisting.sln")).Return(false);

            var runConfig = _parser.GetConfig();
            Assert.IsNull(runConfig);
        }

4. Example

View license
[Test]
		public void IsNull()
		{
			Assert.IsNull(null);
		}

5. Example

Project: ContinuousTests
Source File: shitbird.cs
View license
[Test]
        public void stringnoexception()
        {
            Assert.IsNull(caught);
        }

6. Example

Project: ContinuousTests
Source File: MockTests.cs
View license
[Test] 
		public void ExpectAndReturnNull() 
		{
			mock.ExpectAndReturn("myMethod", null);
			Assert.IsNull( mock.Call("myMethod") );
			mock.Verify();
		}

7. Example

View license
[Test]
        public void when_no_root_node_get_root_node_returns_null()
        {
            var g = new AffectedGraph();
            g.AddNode(new AffectedGraphNode("foo", false, false, false, "name", "bar::foo", "assembly", "type", new List<TestDescriptor>(), false, false, 0));
            Assert.IsNull(g.GetRootNode());
        }

8. Example

View license
[Test]
		[ExpectedException(typeof(AssertionException))]
		public void IsNullFails()
		{
			String s1 = "S1";
			expectedMessage =
				"  Expected: null" + Environment.NewLine +
				"  But was:  \"S1\"" + Environment.NewLine;
			Assert.IsNull(s1);
		}

9. Example

View license
[Test]
        public void it_should_not_be_in_the_database_after()
        {
            Assert.IsNull(db.LookUpByName("Test1"));
        }

10. Example

View license
[Test]
		[ExpectedException(typeof(AssertionException))]
		public void IsNullFails()
		{
			String s1 = "S1";
			expectedMessage =
				"  Expected: null" + Environment.NewLine +
				"  But was:  \"S1\"" + Environment.NewLine;
			Assert.IsNull(s1);
		}

11. Example

View license
public static void ShouldBeNull<T>(this T actual)
        {
            Assert.IsNull(actual);
        }

12. Example

View license
[Test]
        public void lookup_returns_null_for_non_existent_item()
        {
            Assert.IsNull(db.LookUpByName("greg"));
        }

13. Example

View license
[Test]
        public void null_method_receives_null_field()
        {
            Assert.IsNull(MSpecTranslator.TranslateGeneratedMethod(null));
        }

14. Example

Project: ContinuousTests
Source File: shitbird.cs
View license
[Test]
        public void noexception()
        {
            int x = 5;
            Assert.IsNull(caught);
        }

15. Example

Project: ContinuousTests
Source File: TestNodeTests.cs
View license
[Test]
		public void ConstructFromTestCase()
		{
			TestNode test = new TestNode( testCase1 );
			Assert.IsNull( test.Tests );
		}

16. Example

View license
[Test]
		public void IsNull()
		{
			Assert.IsNull(null);
		}

17. Example

View license
[Test]
        public void Should_return_null_when_non_existing_testrunconfig_file_return_null()
        {
            _configuration.Stub(c => c.WatchPath).Return("NotExisting.sln");
            _fs.Stub(c => c.FileExists("NotExisting.sln")).Return(true);
            _configuration.Stub(c => c.WatchPath).Return("NotExisting.vsmdi");
            _fs.Stub(c => c.FileExists("NotExisting.vsmdi")).Return(true);
            _fs.Stub(c => c.ReadFileAsText("NotExisting.vsmdi")).Return("blah blah blah storage=\"something.testrunconfig\"");
            _fs.Stub(c => c.FileExists("something.testrunconfig")).Return(false);

            var runConfig = _parser.GetConfig();
            Assert.IsNull(runConfig);
        }

18. Example

View license
[Test]
		public void FixtureNotFound()
		{
			TestPackage package = new TestPackage( testsDll );
			package.TestName = "NUnit.Tests.Junk";
			Assert.IsNull( builder.Build( package ) );
		}

19. Example

View license
[Test]
		public void NoDescription()
		{
			Test testCase = TestBuilder.MakeTestCase( FixtureType, "NoDescriptionMethod" );
			Assert.IsNull(testCase.Description);
		}

20. Example

Project: ContinuousTests
Source File: MockTests.cs
View license
[Test] 
		public void ExpectAndReturnNull() 
		{
			mock.ExpectAndReturn("myMethod", null);
			Assert.IsNull( mock.Call("myMethod") );
			mock.Verify();
		}

21. Example

View license
[Test]
		public void FixtureNotFound()
		{
			TestPackage package = new TestPackage( testsDll );
			package.TestName = "NUnit.Tests.Junk";
			Assert.IsNull( builder.Build( package ) );
		}

22. Example

View license
[Test]
		[ExpectedException(typeof(AssertionException))]
		public void IsNullFails()
		{
			String s1 = "S1";
			expectedMessage =
				"  Expected: null" + Environment.NewLine +
				"  But was:  \"S1\"" + Environment.NewLine;
			Assert.IsNull(s1);
		}

23. Example

View license
[Test]
		public void FixtureNotFound()
		{
			TestPackage package = new TestPackage( testsDll );
			package.TestName = "NUnit.Tests.Junk";
			Assert.IsNull( builder.Build( package ) );
		}

24. Example

View license
[Test]
        public void Should_return_null_when_invalid_vsdmi_content_return_null()
        {
            _configuration.Stub(c => c.WatchPath).Return("NotExisting.sln");
            _fs.Stub(c => c.FileExists("NotExisting.sln")).Return(true);
            _configuration.Stub(c => c.WatchPath).Return("NotExisting.vsmdi");
            _fs.Stub(c => c.FileExists("NotExisting.vsmdi")).Return(true);
            _fs.Stub(c => c.ReadFileAsText("NotExisting.vsmdi")).Return("");

            var runConfig = _parser.GetConfig();
            Assert.IsNull(runConfig);
        }

25. Example

View license
[Test]
        public void Should_return_null_when_no_vsdmi_content_return_null()
        {
            _configuration.Stub(c => c.WatchPath).Return("NotExisting.sln");
            _fs.Stub(c => c.FileExists("NotExisting.sln")).Return(true);
            _configuration.Stub(c => c.WatchPath).Return("NotExisting.vsmdi");
            _fs.Stub(c => c.FileExists("NotExisting.vsmdi")).Return(true);
            _fs.Stub(c => c.ReadFileAsText("NotExisting.vsmdi")).Return(null);

            var runConfig = _parser.GetConfig();
            Assert.IsNull(runConfig);
        }

26. Example

View license
[Test]
        public void Should_return_null_when_no_vsdmi_present_return_null()
        {
            _configuration.Stub(c => c.WatchPath).Return("NotExisting.sln");
            _fs.Stub(c => c.FileExists("NotExisting.sln")).Return(true);
            _configuration.Stub(c => c.WatchPath).Return("NotExisting.vsmdi");
            _fs.Stub(c => c.FileExists("NotExisting.vsmdi")).Return(true);
            _fs.Stub(c => c.ReadFileAsText("NotExisting.vsmdi")).Return(null);

            var runConfig = _parser.GetConfig();
            Assert.IsNull(runConfig);
        }

27. Example

Project: ContinuousTests
Source File: MockTests.cs
View license
[Test] 
		public void ExpectAndReturnNull() 
		{
			mock.ExpectAndReturn("myMethod", null);
			Assert.IsNull( mock.Call("myMethod") );
			mock.Verify();
		}

28. Example

View license
[Test]
        public void Should_return_null_when_non_closed_storage_tag_return_null()
        {
            _configuration.Stub(c => c.WatchPath).Return("NotExisting.sln");
            _fs.Stub(c => c.FileExists("NotExisting.sln")).Return(true);
            _configuration.Stub(c => c.WatchPath).Return("NotExisting.vsmdi");
            _fs.Stub(c => c.FileExists("NotExisting.vsmdi")).Return(true);
            _fs.Stub(c => c.ReadFileAsText("NotExisting.vsmdi")).Return("blah blah blah storage=\"something");

            var runConfig = _parser.GetConfig();
            Assert.IsNull(runConfig);
        }

29. Example

Project: ContinuousTests
Source File: TestNodeTests.cs
View license
[Test]
		public void ConstructFromTestCase()
		{
			TestNode test = new TestNode( testCase1 );
			Assert.IsNull( test.Tests );
		}

30. Example

View license
[Test]
		public void NoDescription()
		{
			Test testCase = TestBuilder.MakeTestCase( FixtureType, "NoDescriptionMethod" );
			Assert.IsNull(testCase.Description);
		}

31. Example

View license
[Test]
		public void NoDescription()
		{
			Test testCase = TestBuilder.MakeTestCase( FixtureType, "NoDescriptionMethod" );
			Assert.IsNull(testCase.Description);
		}

32. Example

View license
[Test]
        public void it_should_not_be_in_the_database_after()
        {
            Assert.IsNull(db.LookUpByName("Test1"));
        }

33. Example

View license
[Test]
            public void Should_read_from_store()
            {
                Assert.IsNull(_targetProvider.ReadProjection);
            }

34. Example

View license
[Test]
        public void When_Geometry_Is_Not_Emitted_By_Map_Function_Geometry_Is_Null()
        {
            using (var cluster = new Cluster(ClientConfigUtil.GetConfiguration()))
            {
                using (var bucket = cluster.OpenBucket("travel-sample"))
                {
                    var query = new SpatialViewQuery().From("spatial", "routes")
                         .Stale(StaleState.False)
                         .ConnectionTimeout(60000)
                         .Limit(1)
                         .Skip(0);

                    var result = bucket.Query<dynamic>(query);
                    Assert.IsNull(result.Rows.First().Geometry);
                }
            }
        }

35. Example

View license
[Test]
        public void Test_Enumeration_NoClientId()
        {
            var stream = ResourceHelper.ReadResourceAsStream("Data\\no_client_id.json");

            var response = new StreamingQueryResult<dynamic>
            {
                ResponseStream = stream
            };

            Assert.IsNull(response.ClientContextId);
        }

36. Example

View license
[Test]
        public void When_Replica_Index_1_LocatePrimary_Returns_Random_Server()
        {
            var vbucket = new VBucket(new Dictionary<IPEndPoint, IServer>{}, 100, -1, new[] { 0 }, 0, new VBucketServerMap{ ServerList = new []{ "127.0.0.1:10210" }}, "default");
            var found = vbucket.LocatePrimary();
            Assert.IsNull(found);//should be null
        }

37. Example

View license
[Test]
        public void Test_StreamingHttp_Is_Null()
        {
            Assert.IsNull(_serverConfig.StreamingHttp);
        }

38. Example

View license
[TestCase(ResponseStatus.None)]
        [TestCase(ResponseStatus.Success)]
        [TestCase(ResponseStatus.ClientFailure)]
        [TestCase(ResponseStatus.OperationTimeout)]
        [TestCase(ResponseStatus.NoReplicasFound)]
        [TestCase(ResponseStatus.NodeUnavailable)]
        [TestCase(ResponseStatus.TransportFailure)]
        [TestCase(ResponseStatus.DocumentMutationLost)]
        [TestCase(ResponseStatus.SubDocPathNotFound)]
        [TestCase(ResponseStatus.SubDocPathMismatch)]
        [TestCase(ResponseStatus.SubDocPathInvalid)]
        [TestCase(ResponseStatus.SubDocPathTooBig)]
        [TestCase(ResponseStatus.SubDocDocTooDeep)]
        [TestCase(ResponseStatus.SubDocCannotInsert)]
        [TestCase(ResponseStatus.SubDocDocNotJson)]
        [TestCase(ResponseStatus.SubDocNumRange)]
        [TestCase(ResponseStatus.SubDocDeltaRange)]
        [TestCase(ResponseStatus.SubDocPathExists)]
        [TestCase(ResponseStatus.SubDocValueTooDeep)]
        [TestCase(ResponseStatus.SubDocInvalidCombo)]
        [TestCase(ResponseStatus.SubDocMultiPathFailure)]
        public void SetException_Should_Not_Set_An_Exception_For_Given_Status(ResponseStatus status)
        {
            var operationResult = new OperationResult
            {
                Success = false,
                Status = status
            };

            operationResult.SetException();
            Assert.IsNull(operationResult.Exception);
        }

39. Example

View license
[Test]
		public void ConstructorNullConverterType ()
		{
			// ok
			var c = new XamlValueConverter<TypeConverter> (null, XamlLanguage.Int32);
			Assert.IsNull (c.ConverterInstance, "#1");
		}

40. Example

Project: Unity3D.Amqp
Source File: TestBasicGet.cs
View license
[Test]
        public void TestBasicGetWithEmptyResponse()
        {
            WithEmptyQueue((m, q) => {
                BasicGetResult res = m.BasicGet(q, false);
                Assert.IsNull(res);
            });
        }

41. Example

Project: Unity3D.Amqp
Source File: TestBasicGet.cs
View license
[Test]
        public void TestBasicGetWithEmptyResponse()
        {
            WithEmptyQueue((m, q) => {
                BasicGetResult res = m.BasicGet(q, false);
                Assert.IsNull(res);
            });
        }

42. Example

Project: DOLSharp
Source File: FriendsManagerTest.cs
View license
[Test]
		public void FriendsManager_FriendsEnterGameAnon_ReceiveNoAddPacket()
		{
			string[] received = null;
			var client = new GameClient(GameServer.Instance) {
				Account = new Account() { Characters = new [] { new DOLCharacters() { SerializedFriendsList = "buddy , mate , someone" } } },
				Out = new TestPacketLib() { SendAddFriendsMethod = (lib, friends) => received = friends }
			};
			var gameplayer = new GamePlayer(client, client.Account.Characters[0]);
			client.Player = gameplayer;
			
			GameServer.Instance.PlayerManager.Friends.AddPlayerFriendsListToCache(gameplayer);
			var clientMate = new GameClient(GameServer.Instance) {
				Account = new Account() { Characters = new [] { new DOLCharacters() { Name = "mate", IsAnonymous = true } } },
				Out = new TestPacketLib()
			};
			var gameplayerMate = new GamePlayer(clientMate, clientMate.Account.Characters[0]);
			
			GameServer.Instance.PlayerManager.Friends.AddPlayerFriendsListToCache(gameplayerMate);
			
			GameEventMgr.Notify(GamePlayerEvent.GameEntered, gameplayerMate);
			Assert.IsNull(received);
			GameServer.Instance.PlayerManager.Friends.RemovePlayerFriendsListFromCache(gameplayer);
			GameServer.Instance.PlayerManager.Friends.RemovePlayerFriendsListFromCache(gameplayerMate);
		}

43. Example

Project: DOLSharp
Source File: WeatherManagerTest.cs
View license
[Test]
		public void WeatherManager_GetNonExistentRegion_ReturnNull()
		{
			var weatherMgr = new WeatherManager(new SimpleScheduler());
			
			Assert.IsNull(weatherMgr[1]);
		}

44. Example

Project: DOLSharp
Source File: FriendsManagerTest.cs
View license
[Test]
		public void FriendsManager_FriendsExitGame_ReceiveNoRemovePacket()
		{
			string[] received = null;
			var client = new GameClient(GameServer.Instance) {
				Account = new Account() { Characters = new [] { new DOLCharacters() { SerializedFriendsList = "buddy , mate , someone" } } },
				Out = new TestPacketLib() { SendRemoveFriendsMethod = (lib, friends) => received = friends }
			};
			var gameplayer = new GamePlayer(client, client.Account.Characters[0]);
			client.Player = gameplayer;
			
			GameServer.Instance.PlayerManager.Friends.AddPlayerFriendsListToCache(gameplayer);
			var clientMate = new GameClient(GameServer.Instance) {
				Account = new Account() { Characters = new [] { new DOLCharacters() { Name = "mate", IsAnonymous = true } } },
				Out = new TestPacketLib()
			};
			var gameplayerMate = new GamePlayer(clientMate, clientMate.Account.Characters[0]);
			
			GameServer.Instance.PlayerManager.Friends.AddPlayerFriendsListToCache(gameplayerMate);
			
			GameEventMgr.Notify(GamePlayerEvent.Quit, gameplayerMate);
			Assert.IsNull(received);
			GameServer.Instance.PlayerManager.Friends.RemovePlayerFriendsListFromCache(gameplayer);
			GameServer.Instance.PlayerManager.Friends.RemovePlayerFriendsListFromCache(gameplayerMate);
		}

45. Example

Project: CSMSL
Source File: PeptideTestFixture.cs
View license
[Test]
        public void ClearNTerminusMod()
        {
            ChemicalFormula formula = new ChemicalFormula("Fe");
            _mockPeptideEveryAminoAcid.SetModification(formula, Terminus.N);

            _mockPeptideEveryAminoAcid.ClearModifications(Terminus.N);

            Assert.IsNull(_mockPeptideEveryAminoAcid.NTerminusModification);
        }

46. Example

Project: CSMSL
Source File: PeptideTestFixture.cs
View license
[Test]
        public void ClearCTerminusMod()
        {
            ChemicalFormula formula = new ChemicalFormula("Fe");
            _mockPeptideEveryAminoAcid.SetModification(formula, Terminus.C);

            _mockPeptideEveryAminoAcid.ClearModifications(Terminus.C);

            Assert.IsNull(_mockPeptideEveryAminoAcid.CTerminusModification);
        }

47. Example

Project: Rabbit
Source File: IdParserTests.cs
View license
[Test]
        public void RoomIdTooLongTest()
        {
            Exception expectedException = null;

            try
            {
                string worldid;
                IdParser.TryParse("http://domain.com/PWthisroomnameiswaytoolongtoprocessefficientlyomgz12", out worldid);
            }
            catch (Exception ex)
            {
                expectedException = ex;
            }

            Assert.IsNull(expectedException);
        }

48. Example

Project: Rabbit
Source File: RabbitTests.cs
View license
[Test]
        public void InvalidAuthenticationTest()
        {
            InvalidOperationException expectedException = null;

            try
            {
                RabbitAuth.GetAuthType("47823", "notahexadecimalstringohno");
            }
            catch (InvalidOperationException ex)
            {
                expectedException = ex;
            }

            Assert.IsNull(expectedException);
        }

49. Example

Project: OutlookPrivacyPlugin
Source File: JValueTests.cs
View license
[Test]
        public void Next()
        {
            JValue v = new JValue(true);
            Assert.IsNull(v.Next);
        }

50. Example

View license
[Test]
        public void EvaluateOutOfBoundsIndxer()
        {
            JArray a = new JArray(1, 2, 3, 4, 5);

            JToken t = a.SelectToken("[1000].Ha");
            Assert.IsNull(t);
        }