Exemple #1
0
        public async Task TestInvalidConfigContentsStartup()
        {
            await ResetTestAsync();

            await ThrowsAsync(() =>
            {
                return(MAS.StartWithConfigAsync("{{{something something bad JSON").AsTask());
            });
        }
Exemple #2
0
        public async Task TestNullConfigContentsStartup()
        {
            await ResetTestAsync();

            await ThrowsAsync(() =>
            {
                return(MAS.StartWithConfigAsync(null).AsTask());
            });
        }
Exemple #3
0
        public async Task TestEmptyConfigContentsStartup()
        {
            await ResetTestAsync();

            await ThrowsAsync(() =>
            {
                return(MAS.StartWithConfigAsync(string.Empty).AsTask());
            });
        }
Exemple #4
0
        public async Task TestMissingPropertyConfigContentsStartup()
        {
            await ResetTestAsync();

            var file = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///bogus_msso_config.json"));

            var configText = await Windows.Storage.FileIO.ReadTextAsync(file);

            await ThrowsAsync(() =>
            {
                return(MAS.StartWithConfigAsync(configText).AsTask());
            });
        }
Exemple #5
0
        public async Task TestConfigContentsStartup()
        {
            await ResetTestAsync();

            MAS.ConfigFileName   = "msso_config.json";
            MAS.RegistrationKind = RegistrationKind.Client;

            var file = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///msso_config.json"));

            var configText = await Windows.Storage.FileIO.ReadTextAsync(file);

            await MAS.StartWithConfigAsync(configText);

            Assert.IsTrue(MASDevice.Current?.IsRegistered == true);
        }