public Metadata Add(VmGame model) { long id = this.GetUserId(); model.AuthorId = id; this._service.AddGame(model); return(new Metadata(id.ToString())); }
public void AddGameShouldSuccess() { var model = new VmGame { Name = "snake", Category = GameCategory.Relax, Description = "des", Rule = "rule", Id = 1, AuthorId = 2, Author = "test" }; try { this._service.AddGame(model); } catch { throw; } }