Examples of PhotoSpot


Examples of ee.devclub.model.PhotoSpot

    }

    @POST
    public PhotoSpot newPhotoSpot(@FormParam("name") String name, @FormParam("description") String description,
                                  @FormParam("lat") float lat, @FormParam("lon") float lon) {
        return repo.persist(new PhotoSpot(name, description, new Location(lat, lon)));
    }
View Full Code Here

Examples of ee.devclub.model.PhotoSpot

    }

    @Test
    public void resourceLimitedNumberOfSpotsInRepo() throws Exception {
        resource.maxSpots = 10;
        PhotoSpot photoSpot = mock(PhotoSpot.class);
        when(resource.repo.getAllSpots()).thenReturn(nCopies(15, photoSpot));

        assertEquals(10, resource.getAllSpots().size());
    }
View Full Code Here

Examples of ee.devclub.model.PhotoSpot

        resource.newPhotoSpot("Aegna island", "WWI defence structures", 59.583771f, 24.749720f);

        ArgumentCaptor<PhotoSpot> captor = ArgumentCaptor.forClass(PhotoSpot.class);
        verify(resource.repo).persist(captor.capture());

        PhotoSpot spot = captor.getValue();
        assertThat(spot.getName(), is("Aegna island"));
        assertThat(spot.getDescription(), is("WWI defence structures"));
        assertThat(spot.getLocation(), is(new Location(59.583771f, 24.749720f)));
    }
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.