Пример #1
0
        protected void Because()
        {
            var strategy = new StubElasticsearchIndexCreationStrategy(_fixture.Client);

            strategy.Create(Contributors().ToArray());
            _indexSettings = _fixture.RespondsWith <IndexSettings>();
        }
        public async void CreatingIndexAsync()
        {
            var strategy = new StubElasticsearchIndexCreationStrategy(_fixture.Client);
            await strategy.CreateAsync();

            _fixture.ShouldUseHttpMethod("POST");
        }
        public void CreatingIndex()
        {
            var strategy = new StubElasticsearchIndexCreationStrategy(_fixture.Client);

            strategy.Create();
            var response = _fixture.RespondsWith <IndexSettings>();

            response.Should().NotBeNull();
        }
Пример #4
0
        public async void CreatingIndexAsync()
        {
            var strategy = new StubElasticsearchIndexCreationStrategy(_fixture.Client);
            var result   = await strategy.CreateAsync();

            _fixture.ShouldUseHttpMethod("POST");
            result.Success.Should().BeTrue();
            result.Contributors.All(x => x.HasContributed).Should().BeTrue();
        }