示例#1
0
        public void CreateTest()
        {
            SongManager songMng   = new SongManager();
            AlbumDao    albumDao  = new AlbumDao();
            ArtistDao   artistDao = new ArtistDao();

            Album  album  = albumDao.SelectAll().First();
            Artist artist = artistDao.SelectAll().First();

            Song song = new Song()
            {
                title        = "Canción de prueba",
                genre        = "genero de prueba",
                fk_album_id  = album.album_id,
                fk_artist_id = artist.artist_id
            };

            var actual   = songMng.Create(song);
            var expected = true;

            Console.WriteLine(actual.Message);
            Assert.AreEqual(expected, actual.Status);
        }