lundi 27 juillet 2020

How to unit test a method with Func

public async Task<Something> DoSomething()
{
    return await _cache.GetOrAdd(key, async () => 
    {
        // I need to test what is going on here
    });
}

Is there a way how to test everything inside

async () => 
{
    // I need to test what is going on here
}

Aucun commentaire:

Enregistrer un commentaire