public void Get()
        {
            var message = new WelcomeMessage("hello from test");

            var controller = new WelcomeController(message);

            Assert.Equal("hello from test", controller.SayHello());
        }
예제 #2
0
        public void Get()
        {
            var            message = new WelcomeMessage("hello from test");
            IConfiguration config  = new Mock <IConfiguration>().Object;

            var controller = new WelcomeController(message, config);

            Assert.Equal("hello from test", controller.SayHello());
        }
예제 #3
0
        public void Get()
        {
            // Arrange
            var message = new WelcomeMessage("hello from test");

            // Act
            var controller = new WelcomeController(message);

            // Assert
            controller.SayHello().Should().Be("hello from test");
        }