public StatisticsModule(IStatisticsProvider provider)
        {
            _provider = provider;

            Post["/Stats/Symbol"] = _ =>
            {
                var data = this.Bind <SequenceModel>();
                return(Response.AsJson(_provider.SymbolCounts(data?.FileName, data?.Content)));
            };

            Post["/Stats/Total"] = _ =>
            {
                var data = this.Bind <SequenceModel>();
                return(Response.AsJson(_provider.TotalCount(data?.FileName, data?.Content)));
            };
        }
Beispiel #2
0
        public void Should_return_proper_total_count()
        {
            var result = _sut.TotalCount("", "");

            result.First().ShouldBe(5);
        }