Beispiel #1
0
        public GuidesHttpClientV1Test()
        {
            var persistence = new GuidesMemoryPersistence();
            var controller  = new GuidesController();

            _client  = new GuidesHttpClientV1();
            _service = new GuidesHttpServiceV1();

            IReferences references = References.FromTuples(
                new Descriptor("wexxle-guides", "persistence", "memory", "default", "1.0"), persistence,
                new Descriptor("wexxle-guides", "controller", "default", "default", "1.0"), controller,
                new Descriptor("wexxle-guides", "client", "http", "default", "1.0"), _client,
                new Descriptor("wexxle-guides", "service", "http", "default", "1.0"), _service,
                new Descriptor("wexxle-attachments", "client", "null", "default", "1.0"), new AttachmentsNullClientV1()
                );

            controller.SetReferences(references);

            _service.Configure(HttpConfig);
            _service.SetReferences(references);

            _client.Configure(HttpConfig);
            _client.SetReferences(references);

            _fixture = new GuidesClientV1Fixture(_client);

            _service.OpenAsync(null).Wait();
            _client.OpenAsync(null).Wait();
        }
Beispiel #2
0
        public GuidesDirectClientV1Test()
        {
            var persistence = new GuidesMemoryPersistence();
            var controller  = new GuidesController();
            var client      = new GuidesDirectClientV1();

            IReferences references = References.FromTuples(
                new Descriptor("wexxle-guides", "persistence", "memory", "default", "1.0"), persistence,
                new Descriptor("wexxle-guides", "controller", "default", "default", "1.0"), controller,
                new Descriptor("wexxle-guides", "client", "direct", "default", "1.0"), client,
                new Descriptor("wexxle-attachments", "client", "null", "default", "1.0"), new AttachmentsNullClientV1()
                );

            controller.SetReferences(references);

            client.SetReferences(references);

            _fixture = new GuidesClientV1Fixture(client);

            client.OpenAsync(null).Wait();
        }