Ensures that one thread starts before another, but finishes after. Per a brilliant code review comment.
The problem was in MethodInfoManager.HasSameBaseMethod. Apparently, for a virtual generic method, GetBaseMethod returns the generic definition (IsGenericMethodDefinition is true), but not for a non-virtual generic method (in this case it returns the realized method itself). This caused IsSameMethod to return false, which in turn caused GetInvokedMethod to return null, and this case was not handled in GetReasonForWhyMethodCanNotBeIntercepted. Fixed the issue by always calling GetGenericMethodDefinition on generic methods.
A.CallTo throws a NullReferenceException when trying to configure a non-virtual generic method. It should throw a FakeConfigurationException, as it does for a non-virtual non-generic method. This commit just adds a test case to prove the issue.
- CreationOptionsSpecs.cs - CreationSpecs.cs - FakeScopeSpecs.cs - MakesVirtualCallInConstructor.cs - UnconfiguredFakeSpecs.cs
…; added "Machine.Specifications.Runner.Console" solution package (the MSpec runners are now in separate packages) and fixed the path in the Rakefile