Pex And Mole

6 Results / Page 1 of 1

todayJuly 17, 2019

  • 9

Pex And Mole Owner

Moles On Base Classes

This one took me a little bit to understand. Sometimes the Moles exception handling is so aggressive that it becomes a little tricky to understand exactly what is bubbling up. Assume MethodX() is a member of base class ConcreteX. Requirements state that you need to have moles for MethodX() in ...

todayMay 28, 2019

  • 7
  • 4

Pex And Mole Owner

Pex And Dynamic Test Methods

Pex as covered in past posts is a pretty great white box testing tool. But let’s assume that you want to have a “factory” in the sense that test methods can be automagically built out. An example of this is you have a list of some acceptable data type, and ...

todayDecember 26, 2018

  • 8
  • 2

Pex And Mole Owner

Runtime Instance From Mole Types

This is more of a quick tip than anything in regards to moles. When using moles, sometimes you might be find yourself executing a safe cast, or trying to, between your Mole and runtime instance type. Why would this happen? Well consider the following simple code: [csharp] TypeX x = ...