public void GetElementPathTest() { string AuthorPathExpected = "TestPath1"; string AlbumPathExpected = "TestPath2"; string MusicPathExpected = "TestPath3"; Author a = new Author("Author1", AuthorPathExpected); a.Albums.Add(new Album(a, "Album1", AlbumPathExpected)); a.Albums[0].Add(new Music("Music1", a, a.Albums[0], MusicPathExpected)); Indexation.ServerMusics.Add(a); var result1 = Indexation.GetElementPath(a); var result2 = Indexation.GetElementPath(a.Albums[0]); var result3 = Indexation.GetElementPath(a.Albums[0].Musics.First()); Assert.AreEqual(AuthorPathExpected, result1); Assert.AreEqual(AlbumPathExpected, result2); Assert.AreEqual(MusicPathExpected, result3); }