public void TestRegisterNonExistantUser() { using (var _server = new UnitTestSkyDoxServer(1344)) { _server.NextResponse.Enqueue(MockResponse.sign_ups_Success); DoxApi doxApi = new DoxApi(_apiUrl); string user = string.Format(_rootEmail, Guid.NewGuid().ToString("N")); string password = "******"; Assert.True(doxApi.RegisterUser(user, password, null)); Assert.Null(doxApi.Error); } }
//[Test] public void TestSignupAsAUserThatAlreadyExistsAndIsValidated() { using (var _server = new UnitTestSkyDoxServer(1344)) { _server.NextResponse.Enqueue(MockResponse.sign_ups_UserAlreadyExists); DoxApi doxApi = new DoxApi(_apiUrl); string user = string.Format(_rootEmail, "validated-personal"); string password = "******"; Assert.False(doxApi.RegisterUser(user, password, null)); Assert.NotNull(doxApi.Error); Assert.AreEqual(doxApi.Error.HttpStatus, 409); Assert.AreEqual(doxApi.Error.Message, "Email address already registered"); } }