public int SetupUser() { var repos = new RepositoryUser(_uow); if (!repos.CheckIfUserExists(this.GetHostName())) { repos.CreatUser(this.GetHostName()); } return(repos.GetUserId(this.GetHostName())); }
public void ShouldCreateNewUser() { repos.CreatUser("SomeUser"); Assert.IsTrue(context.Object.Users.Count(i => i.UserName == "SomeUser") == 1); // Assert.AreEqual(true, userExists); }