Exemple #1
0
        public void StringToIntTest_AがBより小さい()
        {
            string A      = "3";
            string B      = "4";
            int?   result = new MvcBook.Logics.StringToIntLogic().StringToInt(A, B);

            Assert.AreEqual(result, 7);
        }
Exemple #2
0
        public void StringToIntTest_AはBに等しい()
        {
            string A      = "2";
            string B      = "2";
            int?   result = new MvcBook.Logics.StringToIntLogic().StringToInt(A, B);

            Assert.AreEqual(result, 4);
        }
Exemple #3
0
        public void StringToIntTest_B変換整形できない()
        {
            string A      = "0";
            string B      = "test";
            int?   result = new MvcBook.Logics.StringToIntLogic().StringToInt(A, B);

            Assert.IsNull(result);
        }
Exemple #4
0
        public void StringToIntTest_AはBより大きい()
        {
            string A      = "1";
            string B      = "0";
            int?   result = new MvcBook.Logics.StringToIntLogic().StringToInt(A, B);

            Assert.AreEqual(result, 1);
        }
Exemple #5
0
        public void StringToIntTest_AがNull()
        {
            string A      = null;
            string B      = "test";
            int?   result = new MvcBook.Logics.StringToIntLogic().StringToInt(A, B);

            Assert.IsNull(result);
        }