public void TesFindDirectorByName() { string name = "DirectorTest"; var director = _directorService.FindDirectorByName(name); Assert.Equal(name, director.Name); string url = "urlfalse"; director = _directorService.FindDirectorByName(name, url); Assert.True(director == null); }
public IHttpActionResult FindDirectorByName(string name) { // create server director DirectorService DirectorService = new DirectorService(); DirectorService serviceDirector = new DirectorService(); // get director have directorName like name var select = DirectorService.FindDirectorByName(name); if (select != null) { return(Ok(select)); } return(NotFound()); }