Ejemplo n.º 1
0
 public void Setup()
 {
     track = new Track {
     Album = "My Favorite Things",
     Artist = "John Coltrane",
     AlbumArtist = "John Coltrane",
     Genre = "Jazz",
     Name = "Summertime",
     Year = 1961,
     DateAdded = DateTime.Now.AddDays(-3),
     PlayCount = 10,
     PlayDate = DateTime.Now.AddDays(-5)
       };
 }
Ejemplo n.º 2
0
 protected bool Equals(Track other)
 {
     return TrackId == other.TrackId && string.Equals(Name, other.Name) && string.Equals(Artist, other.Artist) &&
     string.Equals(AlbumArtist, other.AlbumArtist) && string.Equals(Composer, other.Composer) &&
     string.Equals(Album, other.Album) && string.Equals(Genre, other.Genre) &&
     string.Equals(Kind, other.Kind) && Size == other.Size && string.Equals(PlayingTime, other.PlayingTime) &&
     TrackNumber == other.TrackNumber && Year == other.Year && DateModified.Equals(other.DateModified) &&
     DateAdded.Equals(other.DateAdded) && BitRate == other.BitRate && SampleRate == other.SampleRate &&
     PlayCount == other.PlayCount && PlayDate.Equals(other.PlayDate) && PartOfCompilation == other.PartOfCompilation;
 }
Ejemplo n.º 3
0
        public void Convert_Trims_Whitespace_on_all_string_attributes()
        {
            var track = new Track {
            Album = "  John Coltrane ", AlbumArtist = "John Coltrane   ",
            Genre = "  Jazz ", Artist = " John Coltrane", Year = 1961
              };
              var translator = new AlbumTranslator();

              var albums = translator.Convert(new List<Track> { track, track, track });
              var album = albums.First();
              Assert.AreEqual(track.Album.Trim(), album.Name);
              Assert.AreEqual(track.AlbumArtist.Trim(), album.AlbumArtist);
              Assert.AreEqual(track.Genre.Trim(), album.Genre);
        }
Ejemplo n.º 4
0
 public void Setup()
 {
     subject = TestTrack.Create();
 }