Example #1
0
        public void can_append_texts()
        {
            //given
            var store = new StringStore();

            var writeFunc  = Funcs.WriteValue(store);
            var appendFunc = Funcs.AppendValue(store);

            var sut = new DelegatesDependendClass(writeFunc, appendFunc);

            //when
            var text = sut.AddText("first", "second");

            //then
            text.Should().Be("first second");
        }
Example #2
0
 public static string Append(string arg, StringStore store)
 {
     return(store.Value + " " + arg);
 }
Example #3
0
 public static void Write(string arg, StringStore store)
 {
     store.Value = arg;
 }