lundi 18 mars 2019

How to write test suite unit using reflection

public int available(Item pItem)
{
    if( aInventory.containsKey(pItem))
    {
        return aInventory.get(pItem);
    }
    else
    {
        return 0;
    }
}

Based on this code, how do I write a test suite to test function "available" to ensure 100% statement coverage in 'available' function? do not use stock function, instead use reflection





Aucun commentaire:

Enregistrer un commentaire