Package org.bukkit

Examples of org.bukkit.World


  @Test
  public void setNorthwest_whenCreatingAndNoCornersAreSet_shouldSetCorner1AtTop()
      throws NotNorthwestException, TooSmallException, TooBigException {
    // Arrange

    World worldMock = mock(World.class);
    when(worldMock.getMaxHeight()).thenReturn(256);
    Warzone zoneMock = mock(Warzone.class);
    when(zoneMock.getTeams()).thenReturn(new ArrayList<Team>());
    when(zoneMock.getMonuments()).thenReturn(new ArrayList<Monument>());
    ZoneVolume volume = new ZoneVolume("test", worldMock, zoneMock);
    Location nw = new Location(worldMock, 0, 64, 0);
View Full Code Here


  @Test(expected = NotNorthwestException.class)
  public void setNorthwest_whenCreating_AndNoCorner1IsSet_ButCorner2Set_AndNewCornerBlockIsToEastOfCorner2_shouldThrowNotNorthwestException()
      throws TooSmallException, TooBigException, NotNorthwestException {
    // Arrange

    World worldMock = mock(World.class);
    Warzone zoneMock = mock(Warzone.class);
    when(zoneMock.getTeams()).thenReturn(new ArrayList<Team>());
    when(zoneMock.getMonuments()).thenReturn(new ArrayList<Monument>());
    ZoneVolume volume = new ZoneVolume("test", worldMock, zoneMock);
    Location nw = new Location(worldMock, -64, 64, -64);
View Full Code Here

  @Test(expected = NotNorthwestException.class)
  public void setNorthwest_whenCreating_AndNoCorner1IsSet_ButCorner2Set_AndNewCornerBlockIsToSouthOfCorner2_shouldThrowNotNorthwestException()
      throws TooSmallException, TooBigException, NotNorthwestException {
    // Arrange

    World worldMock = mock(World.class);
    Warzone zoneMock = mock(Warzone.class);
    when(zoneMock.getTeams()).thenReturn(new ArrayList<Team>());
    when(zoneMock.getMonuments()).thenReturn(new ArrayList<Monument>());
    ZoneVolume volume = new ZoneVolume("test", worldMock, zoneMock);
    Location nw = new Location(worldMock, 64, 64, 64);
View Full Code Here

  @Test(expected = TooSmallException.class)
  public void setNorthwest_whenCreating_AndNoCorner1IsSet_ButCorner2Set_AndNewCornerBlockIsTooCloseToCorner2_shouldThrowTooSmallException()
      throws NotNorthwestException, TooBigException, TooSmallException {
    // Arrange

    World worldMock = mock(World.class);
    Warzone zoneMock = mock(Warzone.class);
    when(zoneMock.getTeams()).thenReturn(new ArrayList<Team>());
    when(zoneMock.getMonuments()).thenReturn(new ArrayList<Monument>());
    ZoneVolume volume = new ZoneVolume("test", worldMock, zoneMock);
    Location nw = new Location(worldMock, -5, 64, 5);
View Full Code Here

  @Test(expected = TooBigException.class)
  public void setNorthwest_whenCreating_AndNoCorner1IsSet_ButCorner2Set_AndNewCornerBlockIsTooFarFromCorner2_shouldThrowTooBigException()
      throws NotNorthwestException, TooSmallException, TooBigException {
    // Arrange

    World worldMock = mock(World.class);
    Warzone zoneMock = mock(Warzone.class);
    when(zoneMock.getTeams()).thenReturn(new ArrayList<Team>());
    when(zoneMock.getMonuments()).thenReturn(new ArrayList<Monument>());
    ZoneVolume volume = new ZoneVolume("test", worldMock, zoneMock);
    Location nw = new Location(worldMock, -1000, 64, 1000);
View Full Code Here

  @Test
  public void setNorthwest_whenCreatingAndCorner1AlreadySet_shouldSetCorner2AtTop()
      throws NotNorthwestException, TooSmallException, TooBigException {
    // Arrange

    World worldMock = mock(World.class);
    when(worldMock.getMaxHeight()).thenReturn(256);
    Warzone zoneMock = mock(Warzone.class);
    when(zoneMock.getTeams()).thenReturn(new ArrayList<Team>());
    when(zoneMock.getMonuments()).thenReturn(new ArrayList<Monument>());
    ZoneVolume volume = new ZoneVolume("test", worldMock, zoneMock);
    Location nw = new Location(worldMock, -64, 64, 64);
View Full Code Here

  @Test(expected = NotNorthwestException.class)
  public void setNorthwest_whenCreating_AndCorner1AlreadySet_ButNewCornerBlockIsEastOfCorner1_shouldThrowNotNorthwestException()
      throws TooSmallException, TooBigException, NotNorthwestException {
    // Arrange

    World worldMock = mock(World.class);
    Warzone zoneMock = mock(Warzone.class);
    when(zoneMock.getTeams()).thenReturn(new ArrayList<Team>());
    when(zoneMock.getMonuments()).thenReturn(new ArrayList<Monument>());
    ZoneVolume volume = new ZoneVolume("test", worldMock, zoneMock);
    Location nw = new Location(worldMock, -64, 64, -64);
View Full Code Here

  @Test(expected = NotNorthwestException.class)
  public void setNorthwest_whenCreating_AndCorner1AlreadySet_ButNewCornerBlockIsSouthOfCorner1_shouldThrowNotNorthwestException()
      throws TooSmallException, TooBigException, NotNorthwestException {
    // Arrange

    World worldMock = mock(World.class);
    Warzone zoneMock = mock(Warzone.class);
    when(zoneMock.getTeams()).thenReturn(new ArrayList<Team>());
    when(zoneMock.getMonuments()).thenReturn(new ArrayList<Monument>());
    ZoneVolume volume = new ZoneVolume("test", worldMock, zoneMock);
    Location nw = new Location(worldMock, 64, 64, 64);
View Full Code Here

  @Test
  public void setNorthwest_whenChangingVolumeWithCorner1NwCorner2Se_shouldMoveCorner1()
      throws NotNorthwestException, TooSmallException, TooBigException {
    // Arrange

    World worldMock = mock(World.class);
    Warzone zoneMock = mock(Warzone.class);
    when(zoneMock.getTeams()).thenReturn(new ArrayList<Team>());
    when(zoneMock.getMonuments()).thenReturn(new ArrayList<Monument>());
    ZoneVolume volume = new ZoneVolume("test", worldMock, zoneMock);
    Location nw = new Location(worldMock, -64, 64, 64);
View Full Code Here

  @Test
  public void setNorthwest_whenChangingVolumeWithCorner1SeCorner2Nw_shouldMoveCorner2()
      throws NotNorthwestException, TooSmallException, TooBigException {
    // Arrange

    World worldMock = mock(World.class);
    Warzone zoneMock = mock(Warzone.class);
    when(zoneMock.getTeams()).thenReturn(new ArrayList<Team>());
    when(zoneMock.getMonuments()).thenReturn(new ArrayList<Monument>());
    ZoneVolume volume = new ZoneVolume("test", worldMock, zoneMock);
    Location nw = new Location(worldMock, -64, 64, 64);
View Full Code Here

TOP

Related Classes of org.bukkit.World

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.