IT Nursery
I have a test class and below I have posted a sample test from the test class namespace AdminPortal.Tests.Controller_Test.Customer { [TestClass] public class BusinessUnitControllerTests { private IBusinessUnitRepository _mockBusinessUnitRepository; private...
  • June 3, 2022
  • 0 Comments
Help, I can’t function without Resharper. All of a sudden my Alt+Enter ↵ shortcut (to bring up the action list) has stopped working. Anybody experienced this or know how...
  • May 21, 2022
  • 0 Comments
public class EnumRouteConstraint<T> : IRouteConstraint where T : struct { private static readonly Lazy<HashSet<string>> _enumNames; // <-- static EnumRouteConstraint() { if (!typeof(T).IsEnum) { throw new ArgumentException( Resources.Error.EnumRouteConstraint.FormatWith(typeof(T).FullName)); } string...
  • May 19, 2022
  • 0 Comments
I’ve got this code: private async void ContextMenuForGroupRightTapped(object sender, RightTappedRoutedEventArgs args) { CheckBox ckbx = null; if (sender is CheckBox) { ckbx = sender as CheckBox; } if (null...
  • May 19, 2022
  • 0 Comments
I am currently working on a solution that has currently 32 Unittests. I have been working with the resharper test runner – which works fine. All tests are running,...
  • May 19, 2022
  • 0 Comments
Often I want to check if a provided value matches one in a list (e.g. when validating): if (!acceptedValues.Any(v => v == someValue)) { // exception logic } Recently,...
  • May 17, 2022
  • 0 Comments