First I'm sorry if question is already been asked but I don't find anyone like the mine (but I assume it is a pretty common question) So I'm trying to do some unit tests, and the first one is already problematic..
I have to test the constructor of my class, in the constructor I set an instance of a private field.. So how do I test if this PRIVATE field is not null? (because I assume is that what I have to test)--> To test :
public BUDGET_MANAGER()
{
this.budget_provider = new BUDGET_PROVIDER();
}
--> Test Mehod :
[TestMethod()]
public void BUDGET_MANAGERConstructorTest1()
{
BUDGET_MANAGER target = new BUDGET_MANAGER();
Assert.IsNotNull(??,"the provider is not instancied");
}
How Can I do that? Thanks for help, I'm pretty lost in unit testing..