mercredi 12 avril 2017

How to do easy constructor test?

Question might be easy, but let's train our brain with simple tasks. How to do unit test of this constructor? (C#)

public static ProductTypes GetInherited(string uniqueId)
    {
        var t = new ProductTypes();
        var l = Instance.FindAll(x => x.TypeId == uniqueId);
        t.AddRange(l);
        return t;

Aucun commentaire:

Enregistrer un commentaire