Пример #1
0
        [InlineData("sample", "SampleMe")] // text length greater than subtext
        public void StringSearch_ThrowsArgumentException(string valueText, string valueSubtext)
        {
            var request = new ExamRequest {
                Text = valueText, Subtext = valueSubtext
            };
            var service = ServiceGenerator.GetService();

            Assert.Throws <ArgumentNullException>(() => service.GetAllIndexResult(request, StringComparison.OrdinalIgnoreCase));
        }
Пример #2
0
        public void StringSearch_ReturnsListInt(string valueText, string valueSubtext, string valueResult)
        {
            var service = ServiceGenerator.GetService();
            var request = new ExamRequest {
                Text = valueText, Subtext = valueSubtext
            };
            var result = service.GetAllIndexResult(request, StringComparison.OrdinalIgnoreCase);

            Assert.NotNull(result);
            Assert.Equal(result.Result, valueResult);
        }