Package com.sonymobile.tools.gerrit.gerritevents.dto.events

Examples of com.sonymobile.tools.gerrit.gerritevents.dto.events.PatchsetCreated


     * test.
     */
    @Test
    public void testIsAllBuildsStartedBuildMemoryPatchSetKey() {
        System.out.println("isAllBuildsStarted");
        PatchsetCreated event = Setup.createPatchsetCreated();
        BuildMemory instance = new BuildMemory();

        AbstractBuild mock = mock(AbstractBuild.class);
        AbstractProject project = mock(AbstractProject.class);
        when(mock.getProject()).thenReturn(project);
View Full Code Here


     * test.
     */
    @Test
    public void testCompleted() {
        System.out.println("completed");
        PatchsetCreated event = Setup.createPatchsetCreated();

        AbstractProject project = mock(AbstractProject.class);
        AbstractBuild build = mock(AbstractBuild.class);
        when(build.getProject()).thenReturn(project);

View Full Code Here

     * test.
     */
    @Test
    public void testStarted() {
        System.out.println("started");
        PatchsetCreated event = Setup.createPatchsetCreated();

        AbstractProject project = mock(AbstractProject.class);
        AbstractBuild build = mock(AbstractBuild.class);
        when(build.getProject()).thenReturn(project);

View Full Code Here

     * test.
     */
    @Test
    public void testTriggered() {
        System.out.println("triggered");
        PatchsetCreated event = Setup.createPatchsetCreated();

        AbstractProject project = mock(AbstractProject.class);

        BuildMemory instance = new BuildMemory();
        instance.triggered(event, project);
View Full Code Here

     * test.
     */
    @Test
    public void testForget() {
        System.out.println("forget");
        PatchsetCreated event = Setup.createPatchsetCreated();

        AbstractProject project = mock(AbstractProject.class);
        AbstractBuild build = mock(AbstractBuild.class);
        when(build.getProject()).thenReturn(project);

View Full Code Here

     * Tests the isBuilding method of the class {@link BuildMemory}.
     * With one memories.
     */
    @Test
    public void testIsBuildingTrue() {
        PatchsetCreated event = Setup.createPatchsetCreated();

        AbstractProject project = mock(AbstractProject.class);
        AbstractBuild build = mock(AbstractBuild.class);
        when(build.getProject()).thenReturn(project);

View Full Code Here

     * Tests the isBuilding method of the class {@link BuildMemory}.
     * With two memories.
     */
    @Test
    public void testIsBuildingTrue2() {
        PatchsetCreated event = Setup.createPatchsetCreated();

        BuildMemory instance = new BuildMemory();
        AbstractProject project = mock(AbstractProject.class);
        AbstractBuild build = mock(AbstractBuild.class);
        when(build.getProject()).thenReturn(project);
        instance.started(event, build);

        PatchsetCreated event2 = Setup.createPatchsetCreated();
        event2.getChange().setNumber(event.getChange().getNumber() + 34);
        project = mock(AbstractProject.class);
        build = mock(AbstractBuild.class);
        when(build.getProject()).thenReturn(project);
        instance.started(event2, build);
        assertTrue(instance.isBuilding(event));
View Full Code Here

     * Tests the isBuilding method of the class {@link BuildMemory}.
     * With no memory.
     */
    @Test
    public void testIsBuildingFalse() {
        PatchsetCreated event = Setup.createPatchsetCreated();
        BuildMemory instance = new BuildMemory();
        assertFalse(instance.isBuilding(event));
    }
View Full Code Here

     * Tests the isBuilding method of the class {@link BuildMemory}.
     * With another event in memory.
     */
    @Test
    public void testIsBuildingFalseSomethingElseIs() {
        PatchsetCreated event = Setup.createPatchsetCreated();
        BuildMemory instance = new BuildMemory();

        PatchsetCreated event2 = Setup.createPatchsetCreated();
        event2.getChange().setNumber(event.getChange().getNumber() + 34);

        AbstractProject project = mock(AbstractProject.class);
        AbstractBuild build = mock(AbstractBuild.class);
        when(build.getProject()).thenReturn(project);
        instance.started(event2, build);
View Full Code Here

     * Tests the isBuilding method of the class {@link BuildMemory}.
     * With a forgotten build.
     */
    @Test
    public void testIsBuildingFalseWhenForgotten() {
        PatchsetCreated event = Setup.createPatchsetCreated();
        BuildMemory instance = new BuildMemory();

        AbstractProject project = mock(AbstractProject.class);
        AbstractBuild build = mock(AbstractBuild.class);
        when(build.getProject()).thenReturn(project);
View Full Code Here

TOP

Related Classes of com.sonymobile.tools.gerrit.gerritevents.dto.events.PatchsetCreated

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.