public void UserProviderGetUserOfflineAreEqual() { var user = new UserEntity() { UserName = "******" }; _provider.CreateUser(user); Assert.AreEqual("Offline", _provider.GetUserEntity(1).UserName, "User is not equal"); }
public async Task <ActionResult <UserModel> > Post([FromBody] UserModel user) { if (!ModelState.IsValid) { return(BadRequest()); } var result = await _usersProvider.CreateUser(user); return(Ok(result)); }