public async Task TestInvalidConfigContentsStartup() { await ResetTestAsync(); await ThrowsAsync(() => { return(MAS.StartWithConfigAsync("{{{something something bad JSON").AsTask()); }); }
public async Task TestNullConfigContentsStartup() { await ResetTestAsync(); await ThrowsAsync(() => { return(MAS.StartWithConfigAsync(null).AsTask()); }); }
public async Task TestEmptyConfigContentsStartup() { await ResetTestAsync(); await ThrowsAsync(() => { return(MAS.StartWithConfigAsync(string.Empty).AsTask()); }); }
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()); }); }
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); }