public void playlistTEST() { Playlist playlist = playlistRepo.getById(new Playlist { Playlist_ID = 1 } ); Assert.AreNotEqual(null, playlist, ""); IQueryable <Playlist> playlists = playlistRepo.query(a => a.Playlist_ID == 1); Assert.AreEqual(1, playlists.Count()); }
public void clear() { IQueryable <Party> partys = partyRepo.query(a => a.Party_ID == 1); foreach (Party item in partys.ToList <Party>()) { partyRepo.remove(item); } IQueryable <Playlist> playlists = playlistRepo.query(a => a.Playlist_ID == 123); foreach (Playlist item in playlists.ToList <Playlist>()) { playlistRepo.remove(item); } }
public void Profile_TEST() { Song song = songrepo.getById(new Song { Song_ID = 11111 } ); Assert.AreNotEqual(null, song, ""); Playlist playlist = playlistrepo.getById(new Playlist { Playlist_ID = 4 } ); Assert.AreNotEqual(null, playlist, ""); Party party = partyrepo.getById(new Party { Party_ID = 4 } ); Assert.AreNotEqual(null, party, ""); Role_Permission role_permission = role_permissionrepo.getById(new Role_Permission { Role_Permission_Combo_ID = 4 } ); Assert.AreNotEqual(null, role_permission, ""); Person_Role person_role = personrolerepo.getById(new Person_Role { Person_Role_ID = 4 } ); Assert.AreNotEqual(null, person_role, ""); Person person = personrepo.getById(new Person { Person_ID = 4 } ); Assert.AreNotEqual(null, person, ""); Profile profile = profilerepo.getById(new Profile { Profile_ID = 4 }); IQueryable <Song> songs = songrepo.query(a => a.Song_ID == 11111); Assert.AreEqual(1, songs.Count()); IQueryable <Playlist> playlists = playlistrepo.query(a => a.Playlist_ID == 4); Assert.AreEqual(1, playlists.Count()); IQueryable <Party> parties = partyrepo.query(a => a.Party_ID == 4); Assert.AreEqual(1, parties.Count()); IQueryable <Role_Permission> roles = role_permissionrepo.query(a => a.Role_Permission_Combo_ID == 4); Assert.AreEqual(1, roles.Count()); IQueryable <Person_Role> p_roles = personrolerepo.query(a => a.Person_Role_ID == 4); Assert.AreEqual(1, p_roles.Count()); IQueryable <Person> persons = personrepo.query(a => a.Person_ID == 4); Assert.AreEqual(1, persons.Count()); IQueryable <Profile> profiles = profilerepo.query(a => a.Profile_ID == 4); Assert.AreEqual(1, profiles.Count()); }