mercredi 3 février 2016

Unit testing coupled methods

In the example below how can I write a unit test for the Deaggregate() method, if I can't set the aggregationInfo object?

public class Aggregator
{
    private AggregationInfo aggregationInfo;

    public List Aggregate(List objects)
    {
        //set aggregationInfo
    }
    public List Deaggregate(List aggregatedObjects)
    {
        //use aggregationInfo for the deagregation 
    }
}

Aucun commentaire:

Enregistrer un commentaire