public void TeamDeleteCommandHandler_Handle() { var team = FakeObjects.TestTeamWithId(); var user = FakeObjects.TestUserWithId(); Team deletedTeam = null; var command = new TeamDeleteCommand() { Id = team.Id, UserId = user.Id }; using (var session = _store.OpenSession()) { session.Store(team); session.Store(user); var commandHandler = new TeamDeleteCommandHandler(session); commandHandler.Handle(command); session.SaveChanges(); deletedTeam = session.Load <Team>(team.Id); } Assert.IsNull(deletedTeam); }
/// <summary> /// Deletes Enterprise Team. /// </summary> /// <param name="teamUid">Enterprise Team UID.</param> /// <returns>Awaitable task.</returns> public async Task DeleteTeam(string teamUid) { var rq = new TeamDeleteCommand { TeamUid = teamUid }; await Auth.ExecuteAuthCommand(rq); await PopulateEnterprise(); }