One would expect this test to pass. It fails.
The recorder.CallStaticConstructors() has been removed
and the Assert inverted compare with the sample MockProductWithStaticConstructor
[TestMethod()]
public void MockProductWithOutStaticConstructor()
{
// Start Mocking
using (RecordExpectations recorder = RecorderManager.StartRecording())
{
// Let mock the product - this will mock the next invocation of Product,
// Lets mock the constructor - but not static constructor
Product mockProduct = new Product();
}
// END OF MOCK SETUP
// Lets get a new Product
Product product = new Product();
// Just name is default
// Note: if the static constructor was not mocked before this will fail
Assert.AreNotEqual("default", product.DefaultName);
}
[quote][/quote]