public void PushToQue_EnsureUserInQue() { var queser1 = Queser.Create("Name1"); var queam = Queam.Create("Team 1", queser1); Que que = queam.CreateNewQue(queser1, "Que"); que.Push(queser1, null); Assert.IsTrue(que.QueQueamQuesers.Any(q => q.QueamQueser.Queser.Id == queser1.Id)); }
public Result <IBotMessage> Execute(CommandArgumentContainer args) { //TODO: HACK Queser queser = _context.Quesers.Find(TempKey); if (queser is null) { EntityEntry <Queser> entityEntry = _context.Quesers.Add(Queser.Create("Fake")); queser = entityEntry.Entity; } _context.Queams.Add(Queam.Create(args.Arguments[0], queser)); _context.SaveChanges(); return(Result.Ok <IBotMessage>(new BotTextMessage($"Created new queam: {args.Arguments[0]}"))); }