public void CheckUser_DoNotPass() { ServiceUserRepository serviceUserRepository = this.CreateServiceUserRepository(); var res = serviceUserRepository.CheckUser(Path.GetRandomFileName(), "B"); Assert.IsFalse(res); }
public void CheckUser_Pass() { ServiceUserRepository serviceUserRepository = this.CreateServiceUserRepository(); string username = Path.GetRandomFileName(); var serviceUsers = subMongoDatabase.GetCollection <ServiceUser>(nameof(ServiceUser)); serviceUsers.InsertOne(new ServiceUser { Username = username, Password = "******" }); var res = serviceUserRepository.CheckUser(username, "B"); Assert.IsTrue(res); }