Examples of Durations


Examples of name.pehl.karaka.shared.model.Durations

                @Override
                public void onFailure(Throwable caught)
                {
                    warn(activity, "Cannot load minutes for current month, week and/or day");
                    getView().updateDurations(new Durations());
                }
            });
        }
View Full Code Here

Examples of name.pehl.karaka.shared.model.Durations

        int week = now.weekOfWeekyear().get();
        int day = now.dayOfMonth().get();
        Duration currentMonth = minutes(repository.findByYearMonth(year, month));
        Duration currentWeek = minutes(repository.findByYearWeek(year, week));
        Duration today = minutes(repository.findByYearMonthDay(year, month, day));
        Durations durations = new Durations(currentMonth, currentWeek, today);

        String url = uriInfo.getAbsolutePath().toASCIIString();
        LinkHeader linkHeader = new LinkHeader().addLink(null, SELF, url, null);
        return Response.ok(durations).header("Link", linkHeader.toString()).build();
    }
View Full Code Here

Examples of name.pehl.karaka.shared.model.Durations

        method.send(new KarakaJsonCallback<Durations, GetDurationsResult>(minutesReader, resultCallback)
        {
            @Override
            protected GetDurationsResult extractResult(final Method method, JsonReader<Durations> reader, JSONObject json)
            {
                Durations durations = reader.read(json);
                durations.setLinks(readHeaderLinks(method));
                return new GetDurationsResult(durations);
            }
        });
    }
View Full Code Here

Examples of name.pehl.karaka.shared.model.Durations

        doAnswer(getDurationsAnswer).when(getDurationsHandler).execute(any(GetDurationsAction.class),
                any(AsyncCallback.class), any(ExecuteCommand.class));

        cut.getDurationsCommand.execute();

        verify(view).updateDurations(new Durations());
    }
View Full Code Here

Examples of name.pehl.karaka.shared.model.Durations

    // --------------------------------------------------------- helper methods

    @SuppressWarnings("unchecked")
    void prepareGetMinutes()
    {
        final GetDurationsResult getDurationsResult = new GetDurationsResult(new Durations(new Duration(1), new Duration(2),
                new Duration(3)));
        Answer<Object> getDurationsAnswer = new Answer<Object>()
        {
            @Override
            public Object answer(InvocationOnMock invocation)
View Full Code Here

Examples of name.pehl.karaka.shared.model.Durations

    }


    void verifyGetDurations()
    {
        verify(view).updateDurations(new Durations(new Duration(1), new Duration(2), new Duration(3)));
    }
View Full Code Here

Examples of org.sonar.api.utils.Durations

  public void setUp() throws Exception {
    IssueChangelogService issueChangelogService = mock(IssueChangelogService.class);
    IssueActionsWriter actionsWriter = mock(IssueActionsWriter.class);
    DebtModelService debtModelService = mock(DebtModelService.class);
    I18n i18n = mock(I18n.class);
    Durations durations = mock(Durations.class);

    showAction = new IssueShowAction(mock(DbClient.class), mock(IssueService.class), issueChangelogService, mock(IssueCommentService.class), actionsWriter,
      mock(ActionPlanService.class), mock(UserFinder.class),
      debtModelService, mock(RuleService.class), i18n, durations);
    SearchAction searchAction = new SearchAction(mock(DbClient.class), mock(IssueChangeDao.class), mock(IssueService.class), mock(IssueActionsWriter.class),
View Full Code Here

Examples of org.sonar.api.utils.Durations

        .setId(103)
        .setKey("PORTABILITY")
        .setName("Portability")
        .setParentId(102));

    durations = new Durations(new Settings().setProperty("sonar.technicalDebt.hoursInDay", 8), null);
    ruleDao = new RuleDao(getMyBatis());

    provider = new RulesProvider();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.