public void CreateSessionWithNullPasswordThrowsException() { var service = new ClientService(); try { service.CreateSession("*****@*****.**", null); } catch (ArgumentException ae) { if (ae.ParamName == "password") { Assert.Pass(); } throw; } }
public void CreateSessionWitInvalidEmailThrowsException() { var service = new ClientService(); Assert.Throws<ArgumentException>(() => service.CreateSession("@bademail.com", "password")); }
public void CreateSessionWithNullEmailThrowsException() { var service = new ClientService(); try { service.CreateSession(null, "password"); } catch (ArgumentException ae) { if (ae.ParamName == "email") { Assert.Pass(); } throw; } Assert.Fail(); }