⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testdicegames4.java

📁 通过JAVA编写的一个小游戏,键盘打字练习
💻 JAVA
字号:
package docAndJUnit;

import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class TestDiceGames4 {

	DiceGames diceGames;
	long exception;
	
	@Before
	public void setUp() throws Exception {
		diceGames=new DiceGames();
	}

	@After
	public void tearDown() throws Exception {
	}
	
	@Test
	public void testcountFormations1()
	{
		exception = 1;
		int[] sides={1};
		assertEquals(exception,diceGames.countFormations(sides));
	}
	
	@Test
	public void testcountFormations2()
	{
		exception = 3;
		int[] sides={2,2};
		assertEquals(exception,diceGames.countFormations(sides));
	}
	
	@Test
	public void testcountFormations3()
	{
		exception = 10;
		int[] sides={4,4};
		assertEquals(exception,diceGames.countFormations(sides));
	}
	
	@Test
	public void testcountFormations4()
	{
		exception = 9;
		int[] sides={3,4};
		assertEquals(exception,diceGames.countFormations(sides));
	}
	
	@Test
	public void testcountFormations5()
	{
		exception = 48;
		int[] sides={4,5,6};
		assertEquals(exception,diceGames.countFormations(sides));
	}
	
	@Test
	public void testcountFormations6()
	{
		exception = -1;
		int[] sides={4,5,6,0};
		assertEquals(exception,diceGames.countFormations(sides));
	}

	@Test
	public void testcountFormations7()
	{
		exception = 916312070471295267L;
		int[] sides=new int[32];
		for(int i=0;i<32;i++)
			sides[i]=32;
		
		assertEquals(exception,diceGames.countFormations(sides));
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -