public void TryParseInstallTest() { // arrange string url1 = "parkitectnexus://install/testidentifier"; // act var result1 = NexusUrl.Parse(url1); Assert.True(UrlAction.Install == result1.Action); Assert.IsInstanceOf(typeof(InstallUrlAction), result1.Data); Assert.AreEqual("testidentifier", (result1.Data as InstallUrlAction)?.Id); }
public void TryParseAuthTest() { // arrange string url1 = "parkitectnexus://auth/myauthkey"; // act var result1 = NexusUrl.Parse(url1); Assert.AreEqual(UrlAction.Auth, result1.Action); Assert.IsInstanceOfType(result1.Data, typeof(AuthUrlAction)); Assert.AreEqual("myauthkey", (result1.Data as AuthUrlAction)?.Key); }