I am having a problem with a chained statement. Here is the code
MediaContentFeed feed = RecorderManager.CreateMockedObject<MediaContentFeed>();
using(RecordExpectations recorder = RecorderManager.StartRecording()){
recorder.ExpectAndReturn(feed.Game.IsReleased, false);
}
I get this exception when the ExpectAndReturn statement is executed.
Error 1 TestCase 'GameFly.Retail.UnitTests.Domain.Product.CriticReviewFixture.IsPreviewWhenNotReleased'
failed: TypeMock.TypeMockException:
*** Mocked return value of MediaContentFeed.get_Game() is unknown, use recorder.Return().
*** Note: Cannot mock types from mscorlib assembly.
at TypeMock.MethodDecorator.b()
at TypeMock.MockManager.a(String A_0, String A_1, Object A_2, Object A_3, Boolean A_4, Object[] A_5)
at TypeMock.InternalMockManager.getReturn(Object that, String typeName, String methodName, Object methodParameters, Boolean isInjected)
at GameFly.Retail.UnitTests.Domain.Product.CriticReviewFixture.IsPreviewWhenNotReleased() in C:DataProjectsGameFlyRetailMainLineSrcGameFly.Retail.UnitTestsDomainProductCriticReviewFixture.cs:line 66 C:DataProjectsGameFlyRetailMainLineSrcGameFly.Retail.UnitTestsDomainProductCriticReviewFixture.cs 66
Am I doing something wrong?
Please let me know if I can provide any further information.