I have a web api and I am exposing a endpoint like so:
api/Holiday?name={name}
This is the controller get method for the web api:
public IQueryable<Holiday> GetHolidayByName(string name)
{
retu db.Holiday.Where(n => string.Equals(n.Name, name));
}
How can I write a unit test for this that checks the names are equal?
