RESUELTO:
Creo el MOCK en un método del tipo TestInitialize:
Código:
this.MockParkingRepository = new Mock<IParkingRepository>();
this.MockParkingRepository.Setup(objSetup => objSetup.StartParking(It.IsAny<Guid>(), It.IsAny<int>(), It.IsAny<int>()))
.Callback((Guid guidUser, int codZone, int codVehicle) =>
{
if (guidUser.Equals(Guid.Empty)) throw new Exception();
});
Y así lo uso durante el Método Test:
Código:
[TestMethod]
public void Can_Start_Parking()
{
//Preparar el Escenario
Guid guidCorrect = new Guid("358C4B59-5403-4270-8C47-E8CD8DEEC307");
int zone = 1;
int vehicle = 1;
ParkingController parkingController = new ParkingController(this.MockParkingRepository.Object);
//Llamar a los métodos
bool result = parkingController.StartParking(guidCorrect, zone, vehicle);
//Validar
Assert.AreEqual(true, result);
}