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"); }
public static string Append(string arg, StringStore store) { return(store.Value + " " + arg); }
public static void Write(string arg, StringStore store) { store.Value = arg; }