public void TestAddUser() { var u = new User { UserName = "******", Password = "******", Profiles = new List <Profile>() }; var mss = new MongoSuperService(MongoTestIP); mss.AddUser(u); }
private void AddUserToDatabase(string username, string password = "******", params Profile[] values) { var sut = new MongoSuperService(MongoTestIP); if (!sut.GetAllUsers().Any(c => c.UserName == username)) { sut.AddUser(new User() { UserName = username, Password = password, Profiles = values }); } }
public void TestAddProfileToUser() { var mss = new MongoSuperService(MongoTestIP); var p = new Profile { Name = "Rainbow", Configurations = new Dictionary <string, dynamic>() }; if (!mss.Exists("Ben")) { var u = new User { UserName = "******", Password = "******", Profiles = new List <Profile>() }; mss.AddUser(u); } p.Configurations.Add("keyboard", "red"); mss.AddProfileToUser("Ben", p); }