Пример #1
0
        public void IsValid_WithValidInputAndIndex_Should_Return_True(string input, int index)
        {
            var value = new FormsMVCModel {
                Input = input, SortType = (SorterTypes)index, Output = null
            };

            var result = value.IsValid();

            Assert.IsTrue(result);
        }
Пример #2
0
        public async Task <FormsMVCView> SortInputAsync(FormsMVCModel model)
        {
            if (model.IsValid())
            {
                model.Output = await _sortingService.ApplySortingAsync(model);
            }
            else
            {
                model.Output = "Input should only contain [A-Z , a-z]";
            }

            CreateView(model);
            return(View);
        }