public string PostSignUp(SignInUpDto credentials) { var manager = new LoginManager(); var result = manager.SignUp(credentials.Email, credentials.Password); return result ? manager.SignIn(credentials.Email, credentials.Password) : null; }
public void SignUpTest() { var manager = new LoginManager(); Assert.Throws<InvalidOperationException>(() => manager.SignIn(Guid.NewGuid() + "*****@*****.**", "ttt")); var email = Guid.NewGuid() + "*****@*****.**"; manager.SignUp(email, "ttt"); var sid = manager.SignIn(email, "ttt"); Assert.IsNotEmpty(sid); }