KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to make a shim in VS 2012 ultimate as it described in MSDN site: [TestClass] public class TestClass1 { [TestMethod] public void TestCurrentYear() { int fixedYear = 2000; using (ShimsContext.Create()) { // Arrange: // Detour DateTime.Now to return a fixed date: System.Fakes.ShimDateTime.NowGet = () => { return new DateTime(fixedYear, 1, 1); }; // Instantiate the component under test: var componentUnderTest = new MyComponent(); // Act: int year = componentUnderTest.GetTheCurrentYear(); // Assert: // This will always be true if the component is working: Assert.AreEqual(fixedYear, year); } } } see http://msdn.microsoft.com/en-us/library/hh549176.aspx But when I compile my test project I get a notion in Output: warning : Some fakes could not be generated. For complete details, set Diagnostic attribute of the Fakes element in this file to 'true' and rebuild the project. How can I resolve this warning?
Tags (comma-separated)
Save Edits
Cancel