public void TestMethod14() { testFunction func = new testFunction(); string expected = "硬币最少个数→应找余额: 一元的硬币:4个 五角的硬币:1个 一角的硬币:2个"; string actual = func.getSurplusMoney("8.6", "3.9"); Assert.AreEqual(expected, actual); }
public void TestMethod16() { testFunction func = new testFunction(); bool actual = func.chkDate("1000-01-32"); bool expected = false; Assert.AreEqual(expected, actual); }
public void TestMethod14() { testFunction func = new testFunction(); bool actual = func.chkDate("10000228"); bool expected = true; Assert.AreEqual(expected, actual); }
public void TestMethod16() { testFunction func = new testFunction(); string expected = "硬币最少个数→应找余额: 一元的硬币:3个 一角的硬币:3个"; string actual = func.getSurplusMoney("10.1", "6.8"); Assert.AreEqual(expected, actual); }
public void TestMethod10() { testFunction func = new testFunction(); bool actual = func.chkDate("10000101"); bool expected = false; Assert.AreEqual(expected, actual); }
public void TestMethod13() { testFunction func = new testFunction(); string expected = "硬币最少个数→应找余额: 一角的硬币:1个"; string actual = func.getSurplusMoney("5", "4.9"); Assert.AreEqual(expected, actual); }
public void TestMethod10() { testFunction func = new testFunction(); string expected = "不用找零,用户总额和消费额相等。"; string actual = func.getSurplusMoney("5", "5"); Assert.AreEqual(expected, actual); }
public void TestMethod1() { testFunction func = new testFunction(); string expected = "用户总额A和消费额B必须都为正整数或小数点后小于两位的小数"; string actual = func.getSurplusMoney("a", "1"); Assert.AreEqual(expected, actual); }
//SerialPort stream2 = new SerialPort("COM4", 115200 ); void Start () { //センサー入力をキーボードで代用するためシリアル通信停止 //OpenConnection (stream1); //各種スクリプトを使用可能に tF = GetComponent<testFunction> (); mF = GetComponent<moveFunction> (); gameOver = GameObject.Find ("GAMEOVER"); cE = gameOver.GetComponent<canvusEnable> (); audioSource = gameObject.GetComponent<AudioSource>(); first_fall = true; }
public void OnWindowLoadingOpen() { if (isNeedCallback) { testFunction callback = delegate() { Debug.Log("OPEN FINISH OK"); }; LoadingMachineManager.SetOpenFinishCallback(callback); } LoadingMachineManager.OpenWindowLoading("SAMPLE TEST"); }
public void OnLoadingOff() { if (isNeedCallback) { testFunction callback = delegate() { Debug.Log("OFF FINISH OK"); }; LoadingMachineManager.SetOffFinishCallback(callback); } LoadingMachineManager.OffLoading(); }
public void OnFullScreenBlack() { if (isNeedCallback) { testFunction callback = delegate() { Debug.Log("OPEN FINISH OK"); }; LoadingMachineManager.SetOpenFinishCallback(callback); } LoadingMachineManager.OpenFullScreenBlack(); }
public void TestMethod29() { testFunction func = new testFunction(); bool actual = func.chkDate("2008/02/29"); bool expected = false; Assert.AreEqual(expected, actual); }
public void TestMethod28() { testFunction func = new testFunction(); bool actual = func.chkDate("2008/08/31"); bool expected = true; Assert.AreEqual(expected, actual); }
//SerialPort stream2 = new SerialPort("COM4", 115200 ); void Start () { //センサー入力をキーボードで代用するためシリアル通信停止 OpenConnection (stream1); //各種スクリプトを使用可能に tF = GetComponent<testFunction> (); mF = GetComponent<moveFunction> (); GameObject tmp = GameObject.Find("itirenn(kihon)"); motionF = tmp.GetComponent<motionFunction>(); gameOver = GameObject.Find ("GAMEOVER"); cE = gameOver.GetComponent<canvusEnable> (); audioSource = gameObject.GetComponent<AudioSource>(); for(int i = 0; i < 2; i++) { for(int j = 0; j < 20; j++) { moveCount[i,j] = 0; } } first_fall = true; Debug.Log("testFlg = " + testFlg); }
public void TestMethod9() { testFunction func = new testFunction(); string expected = "总额和消费额均不能为零"; string actual = func.getSurplusMoney("0", "0"); Assert.AreEqual(expected, actual); }
public void TestMethod18() { testFunction func = new testFunction(); string expected = "抱歉,消费额超出总额,请追加总额。"; string actual = func.getSurplusMoney("10", "10.1"); Assert.AreEqual(expected, actual); }