public void ParseAppSecretNoEquals() { var appSecret = Guid.NewGuid().ToString(); var parsedSecret = AppCenter.GetSecretForPlatform(appSecret, "uwp"); Assert.AreEqual(appSecret, parsedSecret); }
public void ParseAppSecretWrongIdentifier() { var appSecret = Guid.NewGuid().ToString(); var platformId = "uwp"; var secrets = $"ios=anotherstring;{platformId}={appSecret};"; Assert.ThrowsException <AppCenterException>( () => AppCenter.GetSecretForPlatform(secrets, platformId + platformId)); }
public void ParseAppSecretExtraSemicolons() { var appSecret = Guid.NewGuid().ToString(); var platformId = "uwp"; var secrets = $"ios=anotherstring;;;;{platformId}={appSecret};;;;"; var parsedSecret = AppCenter.GetSecretForPlatform(secrets, platformId); Assert.AreEqual(appSecret, parsedSecret); }
public void ParseAppSecretFirstOfTwo() { var appSecret = Guid.NewGuid().ToString(); var platformId = "uwp"; var secrets = $"{platformId}={appSecret}; ios=anotherstring"; var parsedSecret = AppCenter.GetSecretForPlatform(secrets, platformId); Assert.AreEqual(appSecret, parsedSecret); }
public void ParseAppSecretOnePlatformTerminatingSemicolon() { var appSecret = Guid.NewGuid().ToString(); var platformId = "uwp"; var secrets = $"{platformId}={appSecret};"; var parsedSecret = AppCenter.GetSecretForPlatform(secrets, platformId); Assert.AreEqual(appSecret, parsedSecret); }
public void VerifyPlatformId() { var appClientId = AppCenter.GetSecretForPlatform("windowsdesktop=6a367cda-2c0a-4fb0-bedf-f110bf4e338b", "windowsdesktop"); Assert.Equal("6a367cda-2c0a-4fb0-bedf-f110bf4e338b", appClientId); }