March 24 (semi) weekly drop – Some Tests in unity fails…

Mar 25, 2008 at 4:38 PM
The installed Unity source for this installation fails on some defined unity tests.

Test Case CanSpecifyLifetimeForType

Throws exception

Could not load type 'Microsoft.Practices.Unity.TestDoubles.SessionLifetimeManager' from assembly 'Tests.Unity'.":"Microsoft.Practices.Unity.TestDoubles.SessionLifetimeManager

Namespace configured in test configuration file (Lifetimes.config) is not matching to namespace defined in TestDobles/SessionLifeTimeManager.cs

<typeAlias alias="session" type="Microsoft.Practices.Unity.TestDoubles.SessionLifetimeManager, Tests.Unity" />

above config should be

<typeAlias alias="session" type="Microsoft.Practices.Unity.Tests.TestDoubles.SessionLifetimeManager, Tests.Unity" />

Test Case ContainerControlledLifetimeReturnsSameInstanceFromMultipleThreads

Throwns exception in ResolutionFailedException class when it tries to use CreateMessage method.

System.ArgumentNullException
Value cannot be null.\r\nParameter name: format

Test Case ContainerThrowsWhenConfiguringStaticMethodForInjection

This fails also to same problem as above…

Test method Microsoft.Practices.Unity.Tests.MethodInjectionFixture.ContainerThrowsWhenConfiguringStaticMethodForInjection threw exception System.ArgumentNullException, but exception System.InvalidOperationException was expected. Exception message: System.ArgumentNullException: Value cannot be null. Parameter name: format

Test Case ShouldThrowIfAttemptsToResolveUnregisteredInterface

More than likely the same problem as above…

Test method Microsoft.Practices.Unity.Tests.UnityContainerFixture.ShouldThrowIfAttemptsToResolveUnregisteredInterface threw exception System.ArgumentNullException, but exception Microsoft.Practices.Unity.ResolutionFailedException was expected. Exception message: System.ArgumentNullException: Value cannot be null. Parameter name: format

Regards,
Alexander
Mar 25, 2008 at 5:34 PM
Something odd is going on with the source code zip - all those tests pass on our build server. And the script that creates the source zip and msi runs the tests as part of the process. Weird, I'll look into it.