IT Nursery
I have some unit tests that expects the ‘current time’ to be different than DateTime.Now and I don’t want to change the computer’s time, obviously. What’s the best strategy...
  • May 31, 2022
  • 0 Comments
IT Nursery
How can this test fail? [TestMethod] public void Get_Code() { var expected = new List<int>(); expected.AddRange(new { 100, 400, 200, 900, 2300, 1900 }); var actual = new...
  • May 29, 2022
  • 0 Comments
Visual Studio allows unit testing of private methods via an automatically generated accessor class. I have written a test of a private method that compiles successfully, but it fails...
  • May 10, 2022
  • 0 Comments
I am trying to run my tests on TeamCity which is currently installed on my machine. System.InvalidOperationException: The Entity Framework provider type ‘System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' for the...
  • May 6, 2022
  • 0 Comments