Esempio n. 1
0
        public async void CreateAdminUserOnSubsonic()
        {
            var result = await _adminSubsonicClient.CreateUserAsync(UserToCreate, Password, UserToCreateEmail, false, true);

            Assert.True(result);

            var user = await _adminSubsonicClient.GetUserAsync(UserToCreate);

            Assert.Equal(user.Username, UserToCreate);
            Assert.Equal(user.Email, UserToCreateEmail);
            Assert.True(user.AdminRole);
            Assert.False(user.CommentRole);
            Assert.False(user.CoverArtRole);
            Assert.False(user.DownloadRole);
            Assert.False(user.JukeboxRole);
            Assert.True(user.PlaylistRole);
            Assert.False(user.PodcastRole);
            Assert.False(user.ScrobblingEnabled);
            Assert.True(user.SettingsRole);
            Assert.False(user.ShareRole);
            Assert.True(user.StreamRole);
            Assert.False(user.UploadRole);

            result = await _adminSubsonicClient.DeleteUserAsync(UserToCreate);

            Assert.True(result);
        }