コード例 #1
0
        public void SetGetFinalText_SetAndGetFinalText_String()
        {
            TextNumber newTextNumber = new TextNumber();

            newTextNumber.MakeTextList("7125");
            newTextNumber.SetFinalText();
            string result = newTextNumber.GetFinalText();

            Assert.AreEqual("seven one hundred twenty five", result);
        }
コード例 #2
0
        public void MakeTextList_CreateListOfTextFromNumber_List()
        {
            TextNumber newTextNumber = new TextNumber();

            newTextNumber.MakeTextList("7125");
            List <string> result  = newTextNumber.GetTextList();
            List <string> newList = new List <string>()
            {
                "five", "twenty", "one hundred", "seven"
            };

            CollectionAssert.AreEqual(newList, result);
        }