public void Initialize() {
            playlistManager = new PlaylistManager(new PlaylistRepository(new EFDbContext(ContextEnum.BeatBuddyTest)), new UserRepository(new EFDbContext(ContextEnum.BeatBuddyTest)));
            userManager = new UserManager(new UserRepository(new EFDbContext(ContextEnum.BeatBuddyTest)));
            user = userManager.CreateUser("[email protected]", "matthias", "test", "acidshards", "");
            playlist = playlistManager.CreatePlaylistForUser("testplaylist", "gekke playlist om te testen", "125", 5, true, "", user);

            trackProvider = new YouTubeTrackProvider();
            albumArtProvider = new BingAlbumArtProvider();

            playlistControllerWithAuthenticatedUser = MyWebApi.Controller<PlaylistController>()
               .WithResolvedDependencyFor<IPlaylistManager>(playlistManager)
               .WithResolvedDependencyFor<IUserManager>(userManager)
               .WithResolvedDependencyFor<ITrackProvider>(trackProvider)
               .WithResolvedDependencyFor<IAlbumArtProvider>(albumArtProvider)
               .WithAuthenticatedUser(
                u => u.WithIdentifier("NewId")
                      .WithUsername(user.Email)
                      .WithClaim(new System.Security.Claims.Claim(System.Security.Claims.ClaimTypes.Email, user.Email))
                      .WithClaim(new System.Security.Claims.Claim("sub", user.Email))
               );
            Track metallicaTrack = new Track()
            {
                Artist = "Metallica",
                Title = "Master of Puppets (live)",
                CoverArtUrl = "",
                Duration = 800,
                TrackSource = new TrackSource
                {
                    SourceType = SourceType.YouTube,
                    Url = "https://www.youtube.com/watch?v=kV-2Q8QtCY4",
                    TrackId = "kV-2Q8QtCY4"
                }
            };
            Track nickelbackTrack = new Track()
            {
                Artist = "Nickelback",
                Title = "How You Remind Me",
                CoverArtUrl = "",
                Duration = 400,
                TrackSource = new TrackSource
                {
                    SourceType = SourceType.YouTube,
                    Url = "https://www.youtube.com/watch?v=1cQh1ccqu8M",
                    TrackId = "1cQh1ccqu8M"
                }
            };

            _addedMetallicaTrack = playlistManager.AddTrackToPlaylist(playlist.Id, metallicaTrack);
            _addedNickelbackTrack = playlistManager.AddTrackToPlaylist(playlist.Id, nickelbackTrack);
            
        }
        public void Initialize()
        {
           
            playlistManager = new PlaylistManager(new PlaylistRepository(new EFDbContext(ContextEnum.BeatBuddyTest)), new UserRepository(new EFDbContext(ContextEnum.BeatBuddyTest)));
            userManager = new UserManager(new UserRepository(new EFDbContext(ContextEnum.BeatBuddyTest)));
            organisationManager = new OrganisationManager(new OrganisationRepository(new EFDbContext(ContextEnum.BeatBuddyTest)));
            _userWithOrganisation = userManager.CreateUser("[email protected]", "matthias", "test", "acidshards", "");
            _userWithoutOrganisation = userManager.CreateUser("[email protected]", "heylen", "jos", "acidshards", "");

            playlist = playlistManager.CreatePlaylistForUser("testplaylist", "gekke playlist om te testen", "125", 5, true, "", _userWithOrganisation);
            _userControllerWithAuthenticatedUserWithOrganisation = MyWebApi.Controller<UserController>()
                .WithResolvedDependencyFor<PlaylistManager>(playlistManager)
                .WithResolvedDependencyFor<UserManager>(userManager)
                .WithResolvedDependencyFor<OrganisationManager>(organisationManager)
                .WithAuthenticatedUser(
                 u => u.WithIdentifier("NewId")
                       .WithUsername(_userWithOrganisation.Email)
                       .WithClaim(new System.Security.Claims.Claim(System.Security.Claims.ClaimTypes.Email, _userWithOrganisation.Email))
                       .WithClaim(new System.Security.Claims.Claim("sub", _userWithOrganisation.Email))
                );

            _userControllerWithAuthenticatedUserWithoutOrganisation = MyWebApi.Controller<UserController>()
                .WithResolvedDependencyFor<PlaylistManager>(playlistManager)
                .WithResolvedDependencyFor<UserManager>(userManager)
                .WithResolvedDependencyFor<OrganisationManager>(organisationManager)
                .WithAuthenticatedUser(
                 u => u.WithIdentifier("NewId")
                       .WithUsername(_userWithOrganisation.Email)
                       .WithClaim(new System.Security.Claims.Claim(System.Security.Claims.ClaimTypes.Email, _userWithoutOrganisation.Email))
                       .WithClaim(new System.Security.Claims.Claim("sub", _userWithoutOrganisation.Email))
                );

            Track track = new Track()
            {
                Artist = "Metallica",
                Title = "Master of Puppets (live)",
                CoverArtUrl = "",
                Duration = 800,
                TrackSource = new TrackSource
                {
                    SourceType = SourceType.YouTube,
                    Url = "https://www.youtube.com/watch?v=kV-2Q8QtCY4"
                }
            };
            Track addedtrack = playlistManager.AddTrackToPlaylist(playlist.Id, track);


            organisation = organisationManager.CreateOrganisation("gek organisatie test","",_userWithOrganisation);
        }
        public void Initialize()
        {
            userManager = new UserManager(new UserRepository(new EFDbContext(ContextEnum.BeatBuddyTest)));
            organisationManager = new OrganisationManager(new OrganisationRepository(new EFDbContext(ContextEnum.BeatBuddyTest)));
            user = userManager.CreateUser("[email protected]", "matthias", "test", "acidshards", "");

            _organisationControllerWithAuthenticatedUser = MyWebApi.Controller<OrganisationsController>()
               .WithResolvedDependencyFor<IUserManager>(userManager)
               .WithResolvedDependencyFor<IOrganisationManager>(organisationManager)
               .WithAuthenticatedUser(
                u => u.WithIdentifier("NewId")
                      .WithUsername(user.Email)
                      .WithClaim(new System.Security.Claims.Claim(System.Security.Claims.ClaimTypes.Email, user.Email))
                      .WithClaim(new System.Security.Claims.Claim("sub", user.Email))
               );

           organisation =  organisationManager.CreateOrganisation("testorganisatie", "", user);

        }
 public void TestInit()
 {
     moviesController = MyWebApi
         .Controller<MoviesController>()
         .WithResolvedDependencies(new MoviesService(Repositories.Movies), new UsersService(Repositories.Users));
 }