Ejemplo n.º 1
0
        public void When_AddText_Expect_PaperToHaveSameText()
        {
            var textToAdd = "new text";

            paper.AddText(textToAdd);

            Assert.AreEqual(paper.Text, textToAdd);
        }
Ejemplo n.º 2
0
        public void When_EditText_Expect_TextToGoIntoLastRemovedText()
        {
            var text         = "Remove text test";
            var textToRemove = "test";
            var editText     = "edit";

            var paper = new Paper();

            paper.AddText(text);
            paper.RemoveText(textToRemove);
            paper.EditText(editText);

            Assert.AreEqual(paper.Text, "Remove text edit");
        }
Ejemplo n.º 3
0
        public void When_EditTextLengthIsGreaterThanOriginalTextLength_Expect_EditedTextToExpandOriginalText()
        {
            var text         = "Remove text";
            var textToRemove = "text";
            var editText     = "edited text";

            var paper = new Paper();

            paper.AddText(text);
            paper.RemoveText(textToRemove);
            paper.EditText(editText);

            Assert.AreEqual(paper.Text, "Remove edited text");
        }
Ejemplo n.º 4
0
        public void When_EditTextIsLongerThanErasedText_Expect_OverridingTextToBeAnAtSymbol()
        {
            var text         = "Remove text test with edit";
            var textToRemove = "text";
            var editText     = "edited text";

            var paper = new Paper();

            paper.AddText(text);
            paper.RemoveText(textToRemove);
            paper.EditText(editText);

            Assert.AreEqual(paper.Text, "Remove edite@e@@x@ith edit");
        }
Ejemplo n.º 5
0
 private void OnSymbolButtonClick(string symbol)
 {
     write_target.AddText(symbol);
 }