コード例 #1
0
        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));
        }
コード例 #2
0
        private void button5_Click(object sender, EventArgs e)
        {
            var helloWorldInserter = new HelloWorldInserter(new UserNameGetter());

            MessageBox.Show(helloWorldInserter.InsertHelloWorld());
        }