NUnit.Framework.Assert.IsNotNull(object, string)

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

200 Examples 7

1. Example

Project: Portable.Xaml
Source File: XamlTypeNameTest.cs
View license
[Test]
		public void ConstructorNamespaceNull ()
		{
			// allowed.
			var xtn = new XamlTypeName (null, "FooBar");
			Assert.IsNotNull (xtn.TypeArguments, "#1");
		}

2. Example

Project: Portable.Xaml
Source File: XamlTypeNameTest.cs
View license
[Test]
		public void ConstructorNameNull ()
		{
			// allowed.
			var xtn = new XamlTypeName ("urn:foo", null);
			Assert.IsNotNull (xtn.TypeArguments, "#1");
		}

3. Example

View license
[Test]
		public void SetHandleMarkupExtension ()
		{
			var i = new XamlTypeInvoker (new XamlType (typeof (TestClassMarkupExtension4), sctx));
			Assert.IsNotNull (i.SetMarkupExtensionHandler, "#1");
		}

4. Example

Project: Portable.Xaml
Source File: XamlTypeNameTest.cs
View license
[Test]
		public void ConstructorDefault ()
		{
			var xtn = new XamlTypeName ();
			Assert.IsNotNull (xtn.TypeArguments, "#1");
		}

5. Example

View license
[Test]
		public void SetHandleTypeConverter ()
		{
			var i = new XamlTypeInvoker (new XamlType (typeof (TestClassTypeConverter4), sctx));
			Assert.IsNotNull (i.SetTypeConverterHandler, "#1");
		}

6. Example

Project: NPOI
Source File: TestOperandClassTransformer.cs
View license
private static Ptg[] ParseFormula(String formula)
        {
            Ptg[] result = HSSFFormulaParser.Parse(formula, (HSSFWorkbook)null);
            Assert.IsNotNull(result, "Ptg array should not be null");
            return result;
        }

7. Example

Project: NPOI
Source File: TestFormulaParser.cs
View license
public static Ptg[] ParseFormula(String formula)
        {
            Ptg[] result = HSSFFormulaParser.Parse(formula, null);
            Assert.IsNotNull(result, "Ptg array should not be null");
            return result;
        }

8. Example

View license
public static T ShouldNotBeNull<T>(this T obj, string message)
        {
            Assert.IsNotNull(obj, message);
            return obj;
        }

9. Example

View license
public static T ShouldNotBeNull<T>(this T obj, string message)
        {
            Assert.IsNotNull(obj, message);
            return obj;
        }

10. Example

Project: nesper
Source File: TestOuterJoinVarC3Stream.cs
View license
private object[][] GetAndResetNewEvents()
        {
            EventBean[] newEvents = _updateListener.LastNewData;
            Assert.IsNotNull(newEvents, "no events received");
            _updateListener.Reset();
            return ArrayHandlingUtil.GetUnderlyingEvents(
                newEvents, new string[]
                {
                    "s0",
                    "s1",
                    "s2"
                });
        }

11. Example

Project: nesper
Source File: TestOuterJoinVarB3Stream.cs
View license
private object[][] GetAndResetNewEvents()
        {
            EventBean[] newEvents = _updateListener.LastNewData;
            Assert.IsNotNull(newEvents, "no events received");
            _updateListener.Reset();
            return ArrayHandlingUtil.GetUnderlyingEvents(
                newEvents, new string[]
                {
                    "s0",
                    "s1",
                    "s2"
                });
        }

12. Example

Project: 32feet
Source File: Assertion.cs
View license
static public void AssertNotNull(string message, Object anObject) 
		{
			NUnit.Framework.Assert.IsNotNull(anObject, message);
		}

13. Example

Project: 32feet
Source File: Assertion.cs
View license
static public void AssertNotNull(string message, Object anObject) 
		{
			NUnit.Framework.Assert.IsNotNull(anObject, message);
		}

14. Example

Project: 32feet
Source File: Assertion.cs
View license
static public void AssertNotNull(Object anObject) 
		{
			NUnit.Framework.Assert.IsNotNull(anObject, string.Empty);
		}

15. Example

Project: 32feet
Source File: Assertion.cs
View license
static public void AssertNotNull(Object anObject) 
		{
			NUnit.Framework.Assert.IsNotNull(anObject, string.Empty);
		}

16. Example

Project: fluent-nhibernate
Source File: MappingTester.cs
View license
public virtual MappingTester<T> Exists()
        {
            Assert.IsNotNull(currentElement, "Couldn't find element matching '" + currentPath + "'");

            return this;
        }

17. Example

View license
[Test]
        public void Create()
        {
            var criterion = new FailureStopCriterion<float>();
            Assert.IsNotNull(criterion, "Should have a criterion now");
        }

18. Example

View license
[Test]
        public void Create()
        {
            var criterion = new FailureStopCriterion<Complex32>();
            Assert.IsNotNull(criterion, "Should have a criterion now");
        }

19. Example

View license
[Test]
        public void Create()
        {
            var criterion = new IterationCountStopCriterion<Complex>(10);
            Assert.IsNotNull(criterion, "A criterion should have been created");
        }

20. Example

View license
[Test]
        public void Create()
        {
            var criterion = new IterationCountStopCriterion<double>(10);
            Assert.IsNotNull(criterion, "A criterion should have been created");
        }

21. Example

View license
[Test]
        public void Create()
        {
            var criterion = new IterationCountStopCriterion<float>(10);
            Assert.IsNotNull(criterion, "A criterion should have been created");
        }

22. Example

View license
[Test]
        public void Create()
        {
            var criterion = new FailureStopCriterion<double>();
            Assert.IsNotNull(criterion, "Should have a criterion now");
        }

23. Example

View license
[Test]
        public void Create()
        {
            var criterion = new IterationCountStopCriterion<Complex32>(10);
            Assert.IsNotNull(criterion, "A criterion should have been created");
        }

24. Example

View license
[Test]
        public void Create()
        {
            var criterion = new FailureStopCriterion<Complex>();
            Assert.IsNotNull(criterion, "Should have a criterion now");
        }

25. Example

Project: DReAM
Source File: AwsS3StorageTest.cs
View license
[Test]
        public void Can_init() {
            Assert.IsNotNull(_s3ClientMock, "test storage wasn't resolved");
        }

26. Example

View license
public static void IsNotNull<T>(this T value, string message = "")
        {
            Assert.IsNotNull(value, message);
        }

27. Example

Project: hbm-to-fnh
Source File: AssertExtensions.cs
View license
public static void ShouldNotBeNull<T>([NotNull] this T item, [NotNull] string errorMessage) where T : class
		{
			Assert.IsNotNull(item, errorMessage);
		}

28. Example

View license
public static void IsNotNull<T>(this T value, string message = "")
        {
            Assert.IsNotNull(value, message);
        }

29. Example

View license
public static T ShouldNotBeNull<T>(this T anObject, string message)
    {
        Assert.IsNotNull(anObject, message);
        return anObject;
    }

30. Example

Project: SmartStoreNET
Source File: TestExtensions.cs
View license
public static T ShouldNotBeNull<T>(this T obj, string message)
        {
            Assert.IsNotNull(obj, message);
            return obj;
        }

31. Example

Project: spring-net
Source File: ReflectionUtilsTests.cs
View license
[Test]
        public void GetMethodIsCaseInsensitive()
        {
            MethodInfo actual = ReflectionUtils.GetMethod(
                typeof(ReflectionUtilsObject),
                "spAngLISh",
                new Type[] { typeof(string), typeof(object[]) });
            Assert.IsNotNull(actual, "ReflectionUtils.GetMethod would appear to be case sensitive.");
        }

32. Example

Project: spring-net
Source File: NUnitAdapter.cs
View license
public static void AssertNotNull(string message, object o)
		{
			Assert.IsNotNull(o, message);
		}

33. Example

Project: spring-net
Source File: CaoFactoryObjectTests.cs
View license
[Test]
        public void DisconnectFromClient()
        {
            IApplicationContext ctx = new XmlApplicationContext("assembly://Spring.Services.Tests/Spring.Data.Spring.Remoting/cao.xml");
            ContextRegistry.RegisterContext(ctx);

            object obj = ctx.GetObject("remoteCaoCounter1");
            Assert.IsNotNull(obj, "CAO is null even though a CAO has been registered.");

            IDisposable cao = obj as IDisposable;
            Assert.IsNotNull(cao, "CAO should implement 'IDisposable' interface.");
        }

34. Example

Project: yacq
Source File: ChainingAssertion.NUnit.cs
View license
public static void IsNotNull<T>(this T value, string message = "")
        {
            Assert.IsNotNull(value, message);
        }

35. Example

Project: riak-dotnet-client
Source File: Extensions.cs
View license
public static void ShouldNotBeNull<T>(this T obj, string message = null) where T : class
        {
            Assert.IsNotNull(obj, message);
        }

36. Example

View license
public static void ShouldNotbeNull(this object obj, string message)
        {
            Assert.IsNotNull(obj, message);
        }

37. Example

View license
[Test]
		public void HasMultipleCategories()
		{
			XmlNodeList categories = resultDoc.SelectNodes("//test-case[@name=\"NUnit.Tests.Assemblies.MockTestFixture.MockTest3\"]/categories/category[@name=\"MockCategory\"]");
			Assert.IsNotNull(categories, "MockCategory not found");
			categories = resultDoc.SelectNodes("//test-case[@name=\"NUnit.Tests.Assemblies.MockTestFixture.MockTest3\"]/categories/category[@name=\"AnotherCategory\"]");
			Assert.IsNotNull(categories, "AnotherCategory not found");
		}

38. Example

View license
[Test]
		public void HasMultipleCategories()
		{
			XmlNodeList categories = resultDoc.SelectNodes("//test-case[@name=\"NUnit.Tests.Assemblies.MockTestFixture.MockTest3\"]/categories/category[@name=\"MockCategory\"]");
			Assert.IsNotNull(categories, "MockCategory not found");
			categories = resultDoc.SelectNodes("//test-case[@name=\"NUnit.Tests.Assemblies.MockTestFixture.MockTest3\"]/categories/category[@name=\"AnotherCategory\"]");
			Assert.IsNotNull(categories, "AnotherCategory not found");
		}

39. Example

Project: ContinuousTests
Source File: TestBaseFixtures.cs
View license
[SetUp]
		public virtual void SetUp()
		{
            var mdr = new DefaultAssemblyResolver();
		    assembly = mdr.Resolve("AutoTest.Minimizer.Tests");
			Assert.IsNotNull(assembly, "assembly was null");
		}

40. Example

Project: ContinuousTests
Source File: extensions.cs
View license
public static TypeDefinition GetTypeDefinition<T>(this AssemblyDefinition assembly)
        {
            var type = assembly.MainModule.GetType(typeof(T).FullName);
            Assert.IsNotNull(type, "type " + typeof(T).FullName + " was null");
            return type;
        }

41. Example

Project: ContinuousTests
Source File: extensions.cs
View license
public static TypeDefinition GetTypeDefinition(this AssemblyDefinition assembly, Type t)
        {
            var type = assembly.MainModule.GetType(t.FullName);
            Assert.IsNotNull(type, "type " + t.FullName + " was null");
            return type;
        }

42. Example

View license
[Test]
		public void HasMultipleCategories()
		{
			XmlNodeList categories = resultDoc.SelectNodes("//test-case[@name=\"NUnit.Tests.Assemblies.MockTestFixture.MockTest3\"]/categories/category[@name=\"MockCategory\"]");
			Assert.IsNotNull(categories, "MockCategory not found");
			categories = resultDoc.SelectNodes("//test-case[@name=\"NUnit.Tests.Assemblies.MockTestFixture.MockTest3\"]/categories/category[@name=\"AnotherCategory\"]");
			Assert.IsNotNull(categories, "AnotherCategory not found");
		}

43. Example

View license
[Test]
		public void GetAbstractTypeFromUriNamespace()
		{
			var ctx = new XamlSchemaContext();
			var tn = new XamlTypeName("urn:mono-test", "AbstractObject");
			var xt = ctx.GetXamlType(tn);
			Assert.IsNotNull(xt, "#1");
			Assert.IsNotNull(xt.UnderlyingType, "#2");
		}

44. Example

Project: Portable.Xaml
Source File: XDataTest.cs
View license
[Test]
		public void SetXmlReader ()
		{
			var x = new XData ();
			x.XmlReader = XmlReader.Create (new StringReader ("<root/>"));
			Assert.IsNull (x.Text, "#1");
			Assert.IsNotNull (x.XmlReader, "#2");
			x.XmlReader = null;
		}

45. Example

Project: Portable.Xaml
Source File: XamlXmlWriterTest.cs
View license
[Test]
		public void SettingsNull ()
		{
			// allowed.
			var w = new XamlXmlWriter (new MemoryStream (), sctx, null);
			Assert.AreEqual (sctx, w.SchemaContext, "#1");
			Assert.IsNotNull (w.Settings, "#2");
		}

46. Example

Project: Portable.Xaml
Source File: XamlTypeTest.cs
View license
[Test]
		public void GetPositionalParametersNoMemberExtension ()
		{
			// wow, so it returns some meaningless method parameters.
			Assert.IsNotNull (new XamlType (typeof (MyXamlType), sctx).GetPositionalParameters (3), "#1");
		}

47. Example

View license
[Test]
		public void GetAbstractType()
		{
			var ctx = new XamlSchemaContext ();
			var xt = ctx.GetXamlType (typeof(AbstractObject));
			Assert.IsNotNull (xt, "#1");
		}

48. Example

Project: Portable.Xaml
Source File: XamlTypeNameTest.cs
View license
[Test]
		public void ConstructorName ()
		{
			var n = new XamlTypeName ("urn:foo", "FooBar");
			Assert.IsNotNull (n.TypeArguments, "#1");
			Assert.AreEqual (0, n.TypeArguments.Count, "#2");
		}

49. Example

Project: Portable.Xaml
Source File: XamlTypeNameTest.cs
View license
[Test]
		public void ConstructorTypeArgumentsNull ()
		{
			var n = new XamlTypeName ("urn:foo", "FooBar", (XamlTypeName []) null);
			Assert.IsNotNull (n.TypeArguments, "#1");
			Assert.AreEqual (0, n.TypeArguments.Count, "#2");
		}

50. Example

View license
[Test]
		public void GetAbstractTypeFromClrNamespace()
		{
			var ctx = new XamlSchemaContext();
			var tn = new XamlTypeName(Compat.TestAssemblyNamespace, "AbstractObject");
			var xt = ctx.GetXamlType(tn);
			Assert.IsNotNull(xt, "#1");
			Assert.IsNotNull(xt.UnderlyingType, "#2");
		}