This project is read-only.

Unit test failures

Mar 19, 2009 at 6:19 PM
I've downloaded latest sources, and here's what I get when I execute unit tests in CThru.Tests:

------ Test started: Assembly: CThru.Tests.dll ------

TestCase 'CThru.Tests.CThruEngineTests.DuringCtorCall_InvokedForAllAspects' failed:

Expected: 2

But was: 0

C:\Projects\NET\CThru\CThru.Tests\CThruEngineTests.cs(181,0): at CThru.Tests.CThruEngineTests.DuringCtorCall_InvokedForAllAspects()

TestCase 'CThru.Tests.CThruEngineTests.DuringMethodCall_AspectThrowsException_EngineCatchesItAndThrows'

failed: Exception was expected

C:\Projects\NET\CThru\CThru.Tests\CThruEngineTests.cs(305,0): at CThru.Tests.CThruEngineTests.DuringMethodCall_AspectThrowsException_EngineCatchesItAndThrows()

TestCase 'CThru.Tests.CThruEngineTests.DuringMethodCall_InvokedForAllAspects' failed:

Expected: 2

But was: 0

C:\Projects\NET\CThru\CThru.Tests\CThruEngineTests.cs(153,0): at CThru.Tests.CThruEngineTests.DuringMethodCall_InvokedForAllAspects()

TestCase 'CThru.Tests.CThruEngineTests.DuringMethodCall_RegisteredAndStartedListening_CallbackIsFired'

failed:

Expected: collection containing "SomeMethod"

But was: <empty>

at NUnit.Framework.CollectionAssert.Contains(IEnumerable collection, Object actual, String message, Object[] args)

at NUnit.Framework.CollectionAssert.Contains(IEnumerable collection, Object actual)

C:\Projects\NET\CThru\CThru.Tests\CThruEngineTests.cs(99,0): at CThru.Tests.CThruEngineTests.DuringMethodCall_RegisteredAndStartedListening_CallbackIsFired()

TestCase 'CThru.Tests.CThruEngineTests.DuringMethodCall_TwoAspectsHaveDifferentBehaviorRequests_ThrowsException'

failed: CThru.ConflictingBehaviorException was expected

TestCase 'CThru.Tests.CThruEngineTests.DuringStaticCtorCall_InvokedForAllAspects'

failed:

Expected: less than or equal to 0

But was: 2

C:\Projects\NET\CThru\CThru.Tests\CThruEngineTests.cs(218,0): at CThru.Tests.CThruEngineTests.DuringStaticCtorCall_InvokedForAllAspects()

TestCase 'CThru.Tests.CThruEngineTests.SkipMethodCall_Used_ActuallySkipped' failed: System.Exception : Fake exception

C:\Projects\NET\CThru\CThru.Tests\CThruEngineTests.cs(452,0): at CThru.Tests.SomeTargetClass.SomeMethod2()

C:\Projects\NET\CThru\CThru.Tests\CThruEngineTests.cs(377,0): at CThru.Tests.CThruEngineTests.SkipMethodCall_Used_ActuallySkipped()

TestCase 'CThru.Tests.CThruEngineTests.StopListeningAndReset_CalledAfterExceptionReturned_ClearsEventHandlers'

failed:

Expected: 1

But was: 0

C:\Projects\NET\CThru\CThru.Tests\CThruEngineTests.cs(273,0): at CThru.Tests.CThruEngineTests.StopListeningAndReset_CalledAfterExceptionReturned_ClearsEventHandlers()

TestCase 'CThru.Tests.CThruEngineTests.StopListeningAndReset_WithTwoAspects_ClearsEventHandlers'

failed:

Expected: 2

But was: 0

C:\Projects\NET\CThru\CThru.Tests\CThruEngineTests.cs(331,0): at CThru.Tests.CThruEngineTests.StopListeningAndReset_WithTwoAspects_ClearsEventHandlers()

 

7 passed, 9 failed, 0 skipped, took 1,61 seconds (NUnit 2.4).

 

Mar 19, 2009 at 8:29 PM
And what is really fishy is that when I build version 13577 all tests pass, when I build 17304, tests fail and I can't see a single difference in CThruEngine source code!
Coordinator
Apr 4, 2009 at 5:44 PM
remove and change all references to typemock in the CThru and in the tests project. it shold work well with version 5.3
Apr 5, 2009 at 6:49 PM
Yes, this happenned with older CThru versions. It works fine now.