Package org.eurekastreams.server.persistence.mappers.requests

Examples of org.eurekastreams.server.persistence.mappers.requests.UpdateActivityFlagRequest


    @Test
    public void testExecuteSet()
    {
        sut = new UpdateActivityFlagExecution(setFlagMapper, true);

        final UpdateActivityFlagRequest rqst = new UpdateActivityFlagRequest(ACTIVITY_ID, true);

        context.checking(new Expectations()
        {
            {
                oneOf(setFlagMapper).execute(with(equalInternally(rqst)));
View Full Code Here


    @Test
    public void testExecuteSetAlready()
    {
        sut = new UpdateActivityFlagExecution(setFlagMapper, true);

        final UpdateActivityFlagRequest rqst = new UpdateActivityFlagRequest(ACTIVITY_ID, true);

        context.checking(new Expectations()
        {
            {
                oneOf(setFlagMapper).execute(with(equalInternally(rqst)));
View Full Code Here

    @Test
    public void testExecuteClear()
    {
        sut = new UpdateActivityFlagExecution(setFlagMapper, false);

        final UpdateActivityFlagRequest rqst = new UpdateActivityFlagRequest(ACTIVITY_ID, false);

        context.checking(new Expectations()
        {
            {
                oneOf(setFlagMapper).execute(with(equalInternally(rqst)));
View Full Code Here

    @Test
    public void testExecuteClearAlready()
    {
        sut = new UpdateActivityFlagExecution(setFlagMapper, false);

        final UpdateActivityFlagRequest rqst = new UpdateActivityFlagRequest(ACTIVITY_ID, false);

        context.checking(new Expectations()
        {
            {
                oneOf(setFlagMapper).execute(with(equalInternally(rqst)));
View Full Code Here

     *            If the activity should be updated.
     */
    @SuppressWarnings("unchecked")
    private void coreTestExecute(final long id, final boolean toFlag, final boolean shouldChange)
    {
        UpdateActivityFlagRequest rqst = new UpdateActivityFlagRequest(id, toFlag);
        boolean result = sut.execute(rqst);

        getEntityManager().flush();

        Query q = getEntityManager().createQuery("FROM Activity WHERE id = :id").setParameter("id", id);
View Full Code Here

    public Serializable execute(final TaskHandlerActionContext<PrincipalActionContext> inActionContext)
            throws ExecutionException
    {
        Long activityId = (Long) inActionContext.getActionContext().getParams();

        boolean updated = setFlagMapper.execute(new UpdateActivityFlagRequest(activityId, toFlag));

        // trigger notification on activity being flagged
        if (toFlag && updated)
        {
            inActionContext.getUserActionRequests().add(
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.persistence.mappers.requests.UpdateActivityFlagRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.