public void CreateUserNotExistingSuccess()
 {
     var projectManager = new ProjectManager { Session = _embeddedDocStore.OpenSession() };
     const string newUser = "******";
     projectManager.CreateUserAccount(newUser);
     var session = _embeddedDocStore.OpenSession();
     var userCount = session.Query<UserAccount>().Where(u => u.Username == newUser && u.Status == UserStatus.Active).Count();
     Assert.That(userCount, Is.EqualTo(1));
 }
 public void CreateUserAlreadyExistsThrowsException()
 {
     var projectManager = new ProjectManager { Session = _embeddedDocStore.OpenSession() };
     const string newUser = "******";
     Assert.That(() => projectManager.CreateUserAccount(newUser), Throws.ArgumentException.With.Message.EqualTo("User " + newUser + " already exists."));
 }