public void TestMethodAssertIsInstanceOf() { var myLogger = new Stf.Utilities.StfLogger { FileName = @"c:\temp\unittestlogger_TestMethodAssertIsInstanceOf.html" }; var myAsserts = new StfAssert(myLogger); myAsserts.EnableNegativeTesting = true; Assert.IsFalse(myAsserts.AssertIsInstanceOf("An integer", 1, Type.GetType("int"))); Assert.IsTrue(myAsserts.AssertIsInstanceOf("A string", "1", Type.GetType(typeof(string).FullName))); Assert.IsTrue(myAsserts.AssertIsInstanceOf("An object", new object(), Type.GetType(typeof(object).FullName))); Assert.IsFalse(myAsserts.AssertIsInstanceOf("null", null, null)); /* * TODO: Have no idea why this fails? * Assert.IsTrue(myAsserts.AssertIsInstanceOf("An object", myAsserts, Type.GetType(typeof(StfAssert).FullName))); * * typeof(StfAssert).FullName returns null? * */ }