using System;
using NUnit.Framework;
using WebService.ServiceInterface;
using WebService.ServiceModel;
using ServiceStack.Testing;
using ServiceStack;

namespace WebService.Tests
{
    [TestFixture]
    public class UnitTests
    {
        private readonly ServiceStackHost appHost;

        public UnitTests()
        {
            appHost = new BasicAppHost(typeof(QueryService).Assembly)
            {
                ConfigureContainer = container =>
                {
                    //Add your IoC dependencies here
                }
            }
            .Init();
        }

        [TestFixtureTearDown]
        public void TestFixtureTearDown()
        {
            appHost.Dispose();
        }

        [Test]
        public void TestMethod1()
        {
            var service = appHost.Container.Resolve<QueryService>();
            Assert.That(response._response, Is.EqualTo("Hello, World!"));
        }
    }
}
