public void UniqueNameDoesValidate() { using (Library library = new LibraryBuilder().Build()) { Guid accessToken = library.LocalAccessControl.RegisterLocalAccessToken(); library.AddPlaylist("Existing", accessToken); library.AddPlaylist("New", accessToken); var fixture = new PlaylistViewModel(library.Playlists.Single(x => x.Name == "New"), library, accessToken, new CoreSettings()); fixture.EditName = true; fixture.Name = "Unique"; Assert.Null(fixture["Name"]); } }