mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-10-31 09:33:43 +01:00 
			
		
		
		
	more test cases
This commit is contained in:
		| @@ -5,6 +5,11 @@ import org.junit.Test; | |||||||
|  |  | ||||||
| import com.intellectualcrafters.plot.PlotHelper; | import com.intellectualcrafters.plot.PlotHelper; | ||||||
| import com.intellectualcrafters.plot.PlotMain; | import com.intellectualcrafters.plot.PlotMain; | ||||||
|  | import com.intellectualcrafters.plot.PlotManager; | ||||||
|  | import com.intellectualcrafters.plot.PlotWorld; | ||||||
|  | import com.intellectualcrafters.plot.SchematicHandler; | ||||||
|  | import com.intellectualcrafters.plot.generator.DefaultPlotManager; | ||||||
|  | import com.intellectualcrafters.plot.generator.DefaultPlotWorld; | ||||||
|  |  | ||||||
| public class Test1 { | public class Test1 { | ||||||
|      |      | ||||||
| @@ -14,4 +19,33 @@ public class Test1 { | |||||||
|     public void testSquare() { |     public void testSquare() { | ||||||
|         Assert.assertEquals(PlotHelper.square(5), 25); |         Assert.assertEquals(PlotHelper.square(5), 25); | ||||||
|     } |     } | ||||||
|  |      | ||||||
|  |     @Test | ||||||
|  |     public void testPlots() { | ||||||
|  |         Assert.assertNotNull(PlotMain.getAllPlotsRaw()); | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     @Test | ||||||
|  |     public void testAddPlotWorld() { | ||||||
|  |         boolean passed = false; | ||||||
|  |         try { | ||||||
|  |             PlotWorld plotworld = new DefaultPlotWorld("poop"); | ||||||
|  |             PlotManager manager = new DefaultPlotManager(); | ||||||
|  |             PlotMain.addPlotWorld("poop", plotworld, manager); | ||||||
|  |             passed = PlotMain.getPlotManager("poop")!=null && PlotMain.getWorldSettings("poop")!=null; | ||||||
|  |         } | ||||||
|  |         catch (Throwable e) { | ||||||
|  |              | ||||||
|  |         } | ||||||
|  |         finally { | ||||||
|  |             Assert.assertTrue(passed); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     @Test | ||||||
|  |     public void testCanSetFast() { | ||||||
|  |         Assert.assertTrue(PlotHelper.canSetFast); | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |      | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 boy0001
					boy0001