public void 한글스트링_작성하기테스트_다른글자도됩니다() { SHangulString pHangul = new SHangulString(); pHangul.DoInsert('ㅇ').DoInsert('ㅏ').DoInsert('ㄴ'). DoInsert('ㄴ').DoInsert('ㅕ').DoInsert('ㅇ'). DoInsert('ㅎ').DoInsert('ㅏ'). DoInsert('ㅅ').DoInsert('ㅔ'). DoInsert('ㅇ').DoInsert('ㅛ'). DoInsert(' '). DoInsert('ㅌ').DoInsert('ㅔ'). DoInsert('ㅅ').DoInsert('ㅡ'). DoInsert('ㅌ').DoInsert('ㅡ'). DoInsert('ㅇ').DoInsert('ㅣ').DoInsert('ㅂ'). DoInsert('ㄴ').DoInsert('ㅣ'). DoInsert('ㄷ').DoInsert('ㅏ'). DoInsert(' '). DoInsert('ㅃ').DoInsert('ㅜ').DoInsert('ㅔ').DoInsert('ㄹ').DoInsert('ㄱ'); Assert.AreEqual("안녕하세요 테스트입니다 쀍", pHangul.ToString()); pHangul.DoInsert(' '). DoInsert('H').DoInsert('i'). DoInsert(' '). DoInsert('I').DoInsert('t').DoInsert('\'').DoInsert('s'). DoInsert(' '). DoInsert('a'). DoInsert(' '). DoInsert('T').DoInsert('e').DoInsert('s').DoInsert('t'); Assert.AreEqual("안녕하세요 테스트입니다 쀍 Hi It's a Test", pHangul.ToString()); pHangul = new SHangulString(); Assert.AreEqual("헤헤", pHangul.DoInsert('ㅎ').DoInsert('ㅔ').DoInsert('ㅎ').DoInsert('ㅔ').ToString()); }
public void 한글스트링_지우기테스트() { SHangulString pHangul = new SHangulString("쀍 Hi"); pHangul.DoRemove(); Assert.AreEqual("쀍 H", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("쀍 ", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("쀍", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("쀌", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("쀄", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("뿌", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("ㅃ", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("", pHangul.ToString()); }
public void 한글스트링_작성하기테스트_이상한경우() { SHangulString pHangul = new SHangulString(); pHangul.DoInsert('ㄱ').DoInsert('ㄴ').DoInsert('ㄷ'). DoInsert('ㅏ').DoInsert('ㅑ'). DoInsert('ㅗ').DoInsert('ㅐ'); Assert.AreEqual("ㄱㄴ다ㅑㅙ", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("ㄱㄴ다ㅑㅗ", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("ㄱㄴ다ㅑ", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("ㄱㄴ다", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("ㄱㄴㄷ", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("ㄱㄴ", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("ㄱ", pHangul.ToString()); pHangul.DoRemove(); Assert.AreEqual("", pHangul.ToString()); }