@Before public void setUp() throws Exception { // To accommodate WorldWind exception handling, we must mock all // the static methods in Logger to avoid calls to android.util.log PowerMockito.mockStatic(Logger.class); // Create the globe object used by the test globe = new Globe(WorldWind.WGS84_ELLIPSOID, new ProjectionWgs84()); }
@Before public void setUp() { // Mock all the static methods in Logger PowerMockito.mockStatic(Logger.class); // Create the globe object used by the test globe = new Globe(WorldWind.WGS84_ELLIPSOID, new ProjectionWgs84()); }
@Before public void setUp() throws Exception { // To accommodate WorldWind exception handling, we must mock all // the static methods in Logger to avoid calls to android.util.log PowerMockito.mockStatic(Logger.class); // Create the globe object used by the test globe = new Globe(WorldWind.WGS84_ELLIPSOID, new ProjectionWgs84()); }
@Before public void setUp() throws Exception { // To accommodate WorldWind exception handling, we must mock all // the static methods in Logger to avoid calls to android.util.log PowerMockito.mockStatic(Logger.class); // Create a globe with a WGS84 definition. this.globe = new Globe(WorldWind.WGS84_ELLIPSOID, new ProjectionWgs84()); }
@Before public void setUp() { // Mock all the static methods in Logger PowerMockito.mockStatic(Logger.class); // Create the globe object used by the test this.globe = new Globe(WorldWind.WGS84_ELLIPSOID, new ProjectionWgs84()); // Create the terrain object used by the test this.terrain = new BasicTerrain(); // Add a terrain tile used to the mocked terrain LevelSet levelSet = new LevelSet(new Sector().setFullSphere(), 1.0, 1, 5, 5); // tiles with 5x5 vertices TerrainTile tile = new TerrainTile(new Sector(0, 0, 1, 1), levelSet.firstLevel(), 90, 180); ((BasicTerrain) this.terrain).addTile(tile); // Populate the terrain tile's geometry int tileWidth = tile.level.tileWidth; int tileHeight = tile.level.tileHeight; int rowStride = (tileWidth + 2) * 3; float[] points = new float[(tileWidth + 2) * (tileHeight + 2) * 3]; Vec3 tileOrigin = this.globe.geographicToCartesian(0.5, 0.5, 0.0, new Vec3()); this.globe.geographicToCartesianGrid(tile.sector, tileWidth, tileHeight, null, 1.0f, tileOrigin, points, rowStride + 3, rowStride); this.globe.geographicToCartesianBorder(tile.sector, tileWidth + 2, tileHeight + 2, 0.0f, tileOrigin, points); tile.setOrigin(tileOrigin); tile.setPoints(points); }