public void Create()
        {
            queries.UpdateSongList(songListContract, null);

            var songList = repository.List <SongList>().FirstOrDefault();

            Assert.IsNotNull(songList, "List was saved to repository");

            Assert.AreEqual(songListContract.Name, songList.Name, "Name");
            Assert.AreEqual(songListContract.Description, songList.Description, "Description");
            Assert.AreEqual(2, songList.AllSongs.Count, "Number of songs");
            Assert.AreEqual("Project Diva desu.", songList.AllSongs[0].Song.DefaultName, "First song as expected");
            Assert.AreEqual("World is Mine", songList.AllSongs[1].Song.DefaultName, "Second song as expected");
        }
示例#2
0
        public void Create()
        {
            _queries.UpdateSongList(_songListContract, null);

            var songList = _repository.List <SongList>().FirstOrDefault();

            songList.Should().NotBeNull("List was saved to repository");

            songList.Name.Should().Be(_songListContract.Name, "Name");
            songList.Description.Should().Be(_songListContract.Description, "Description");
            songList.AllSongs.Count.Should().Be(2, "Number of songs");
            songList.AllSongs[0].Song.DefaultName.Should().Be("Project Diva desu.", "First song as expected");
            songList.AllSongs[1].Song.DefaultName.Should().Be("World is Mine", "Second song as expected");
        }