public IEnumerator LoginThenLogoutSuccess() { yield return(AsyncTest.Execute(manager.LoginAsync(workingCredentials.email, workingCredentials.password, LoginCallback))); manager.Logout(); Assert.IsNull(manager.loggedInUser); Assert.True(manager.ReceiverCount == 0); }
public IEnumerator GetStreamtMetaDataSuccess() { yield return(AsyncTest.Execute(manager.LoginAsync(workingCredentials.email, workingCredentials.password, null))); yield return(AsyncTest.Execute(manager.GetAllStreamMetaDataForUserAsync(StreamCallback))); Assert.NotNull(streamData); Assert.True(gotCallback); }
public IEnumerator LoginSuccess() { yield return(AsyncTest.Execute(manager.LoginAsync(workingCredentials.email, workingCredentials.password, LoginCallback))); Assert.NotNull(manager.loggedInUser); Assert.NotNull(manager.loggedInUser.Apitoken); Assert.AreSame(loggedInUser, manager.loggedInUser); Assert.True(gotCallback); }
public IEnumerator AddReceiverAndInitializeWithInvalidID() { Transform root = new GameObject().transform; yield return(AsyncTest.Execute(manager.LoginAsync(workingCredentials.email, workingCredentials.password, LoginCallback))); yield return(AsyncTest.Execute(AsyncTest.ThrowsAsync <SpeckleException> (manager.AddReceiverAsync("not valid stream ID", root, true)))); LogAssert.Expect(LogType.Error, "INTERNAL ERROR: The HTTP status code of the response was not expected (404)."); }
public IEnumerator AddReceiverAndInitializeSuccess() { Transform root = new GameObject().transform; yield return(AsyncTest.Execute(manager.LoginAsync(workingCredentials.email, workingCredentials.password, LoginCallback))); yield return(AsyncTest.Execute(manager.AddReceiverAsync(workingCredentials.streamID, root, true))); Assert.True(manager.ReceiverCount == 1); }
public IEnumerator OnStartJustLoginSuccess() { manager.onStartBehaviour = StartMode.JustLogin; manager.startLoginEmail = workingCredentials.email; manager.startLoginPassword = workingCredentials.password; yield return(AsyncTest.Execute(manager.RunStartBehaviourAsync())); Assert.NotNull(manager.loggedInUser); Assert.NotNull(manager.loggedInUser.Apitoken); }
public IEnumerator OnStartLoginAndReceiveStreamsSuccess() { Transform root = new GameObject().transform; manager.onStartBehaviour = StartMode.LoginAndReceiveStreams; manager.startLoginEmail = workingCredentials.email; manager.startLoginPassword = workingCredentials.password; yield return(AsyncTest.Execute(manager.AddReceiverAsync(workingCredentials.streamID, root))); yield return(AsyncTest.Execute(manager.RunStartBehaviourAsync())); Assert.True(root.childCount > 0); Assert.NotNull(manager.loggedInUser); Assert.NotNull(manager.loggedInUser.Apitoken); }
public IEnumerator OnStartDoNothingSuccess() { yield return(AsyncTest.Execute(manager.RunStartBehaviourAsync())); Assert.IsNull(manager.loggedInUser); }
public IEnumerator GetStreamMetaDataWithoutLogin() { yield return(AsyncTest.Execute(AsyncTest.ThrowsAsync <UnauthorizedAccessException> (manager.GetAllStreamMetaDataForUserAsync(StreamCallback)))); }
public IEnumerator ConnectToInvalidServer() { manager.SetServerUrl("I am a wrong server URL"); yield return(AsyncTest.Execute(AsyncTest.ThrowsAsync <InvalidOperationException> (manager.LoginAsync("email", "password", LoginCallback)))); }
public IEnumerator LoginWithWrongEmailOrPassword() { yield return(AsyncTest.Execute(AsyncTest.ThrowsAsync <SpeckleException> (manager.LoginAsync("email", "password", LoginCallback)))); }
public IEnumerator AddReceiver() { yield return(AsyncTest.Execute(manager.AddReceiverAsync(workingCredentials.streamID))); Assert.True(manager.ReceiverCount == 1); }