(I'm most familiar with Java, Junit, and mockito - so what I write below is based on my understanding of this applied to what I can find)
You are looking for a mocking tool such as Moq.
In this scenario what you would do is mock the object that contains the DiscountService.
At this point, you would do something like (I have no way of verifying if the following code is correct for the framework, but its in the right direction):
public void Test() {
var mockService = new Mock<IDiscountService>();
SomeClass.ApplyDiscount(1, 0.0);
mockService.Verify(
mockService = foo.ApplyDiscount(), Times.Once());
}
And this will verify that the discount service was called once (and only once) when the ApplyDiscount call was made with the given parameter.
I will caution you that the structure of this code that you have psuedocoded out seems suspect too. The int being passed in and what looks to be something that wants to be a switch statement smells like wishing to be polymorphism.
Consider that if the test is hard to write, sometimes it means that the design of the system is wrong and should be revisited. Well written code tends to be easy to test.
Still, you will want to read up on Moq and use it in the right places (like verifying that something was called the appropriate number of times without putting test code into your actual code - which smells even worse than switches).