Esempio n. 1
0
        public IMessageService SelectMessageService(string serviceType)
        {
            IMessageService service;

            switch (serviceType)
            {
            case "ConsoleMessageService":
                service = new ConsoleMessageService();
                break;

            case "InMemoryMessageService":
                service = new InMemoryMessageService();
                break;

            case "MobileMessageService":
                service = new MobileMessageService();
                break;

            default:
                service = new InMemoryMessageService();
                break;
            }

            return(service);
        }
        public void InMemoryMessageServiceShouldReturnHelloWorld()
        {
            // Arrange
            var    sut      = new InMemoryMessageService();
            string expected = "Hello World";

            // Act
            var actual = sut.GetMessage();

            // Assert
            Assert.That(expected, Is.EqualTo(actual));
        }