Ejemplo n.º 1
0
        public void GetMusicAlbumTest()
        {
            Service.MusicAlbumService testService = new Service.MusicAlbumService(this.AlbumsRepository);
            var result = testService.GetMusicAlbum(1);

            Assert.That(result.Id, Is.EqualTo(1));
        }
Ejemplo n.º 2
0
        public void UpdateMusicAlbumTest()
        {
            var albumModel = new DataContract.Album
            {
                Id        = 1,
                Artist    = "Mike",
                Label     = "Virgin",
                LabelType = DataContract.LabelType.CD,
                Stock     = 10
            };

            Service.MusicAlbumService testService = new Service.MusicAlbumService(this.AlbumsRepository);
            var result = testService.UpdateMusicAlbum(albumModel);

            var updatedalbumModel = testService.GetMusicAlbum(1);

            Assert.That(result, Is.EqualTo(true));

            Assert.That(updatedalbumModel.AlbumName, Is.EqualTo(albumModel.AlbumName));
        }