mercredi 8 juillet 2015

How to unit test if a method only changes a private property and return it

Please take a look at my scenario below,

public class Test
{
    private Tech tech = null;

    ...

    public Tech GetExpectedTech(string condition)
    {
        ...

        return tech;
    }
}

I'm not sure the best way to do unit test for this method. Maybe I can use reflection, but I don't think this is a sensible way. Anybody has ideas?

Thanks

Aucun commentaire:

Enregistrer un commentaire