public async Task DeleteCalculations_Deletes_Dependencies_Using_Correct_SpecificationId_And_DeletionType(string specificationId, DeletionType deletionType) { Message message = new Message { UserProperties = { new KeyValuePair <string, object>("jobId", JobId), new KeyValuePair <string, object>("specification-id", specificationId), new KeyValuePair <string, object>("deletion-type", (int)deletionType) } }; ICalculationsRepository calculationsRepository = CreateCalculationsRepository(); CalculationService calculationService = CreateCalculationService(calculationsRepository: calculationsRepository); await calculationService.DeleteCalculations(message); await calculationsRepository.Received(1).DeleteCalculationsBySpecificationId(specificationId, deletionType); }