public void GetSong_WhenSongNotFound_ReturnsNotFoundResult()
        {
            _songService.Get(Arg.Any <Guid>()).ReturnsNull();

            var actionResult = _songsController.GetSong(Guid.NewGuid());

            Assert.IsType <NotFoundResult>(actionResult.Result);
        }
示例#2
0
        public void GetSong_When_SongDoesNotExist_Returns_NotFoundActionResult()
        {
            var actionResult = _songsController.GetSong(Guid.NewGuid());

            Assert.IsAssignableFrom <NotFoundResult>(actionResult.Result);
        }
示例#3
0
        public void CanGetAllSongs()
        {
            var result = _controller.GetSong(new SongFilter());

            Assert.Equal(result, _testSongs);
        }