public void HandlerAIntegrationTestUsingSQLite()
        {
            var nameToInsert = "Paco";

            //the dependencies are created using a special Session Factory for SQLite
            var          domainTestSessionFactoryCreator = new DomainSessionFactoryTestCreator();
            IServiceXUoW domainUoW = new ServiceXUoW(domainTestSessionFactoryCreator);

            Test.Initialize();

            Test.Handler <CommandAHandler>(
                b => new CommandAHandler(b, new Service1ServiceLocator(domainUoW, b)))
            .OnMessage(new CommandA()
            {
                Name = nameToInsert
            });

            var result = domainUoW.GetAReadRepository().GetAsByName(nameToInsert);

            Assert.IsTrue(result.Count > 0);
        }
Ejemplo n.º 2
0
 public TestIt()
 {
     Test.Initialize(typeof(Endpoint1.EndpointConfig).Assembly);
 }