public void InsertHelloWorld_Returns_String() { var userNameGetter = new Mock <IUserNameGetter>(); var helloWorldInserter = new HelloWorldInserter(userNameGetter.Object); var result = helloWorldInserter.InsertHelloWorld(); Assert.IsFalse(string.IsNullOrEmpty(result)); }
private void button5_Click(object sender, EventArgs e) { var helloWorldInserter = new HelloWorldInserter(new UserNameGetter()); MessageBox.Show(helloWorldInserter.InsertHelloWorld()); }