public void OnlyUsingBuildWithNonEmptyListReturnsEmptyList()
        {
            getStocksFunc = () => arbitraryStockSet;
            var sut = new SummaryBuilder(getStocksFunc);

            CollectionAssert.IsEmpty(sut.Build());
        }
        public void ShouldReturnEmptyDatabaseInfoIfNotSet()
        {
            var builder = new SummaryBuilder(new Statement("RETURN 1"), new ServerInfo(new Uri("bolt://localhost")));
            var summary = builder.Build();

            summary.Database.Should().NotBeNull();
            summary.Database.Name.Should().BeNull();
        }
Пример #3
0
            public static IInternalResultCursor CreateResultCursor(int keyCount, int recordCount,
                                                                   string query = "fake", int delayMs = 0)
            {
                var fields         = Enumerable.Range(1, keyCount).Select(f => $"key{f:D2}").ToArray();
                var summaryBuilder =
                    new SummaryBuilder(new Query(query), new ServerInfo(new Uri("bolt://localhost")));

                return(new ListBasedRecordCursor(fields, () => CreateRecords(fields, recordCount, delayMs),
                                                 () => summaryBuilder.Build()));
            }
Пример #4
0
        private void generateSummary(RunReport report)
        {
            if (report == null)
            {
                _dispatch("run-summary", new { message = "" });
                return;
            }

            var builder = new SummaryBuilder(report);

            _dispatch("run-summary", new { message = builder.Build() });
        }
        public void Should_build_tooltip_string()
        {
            var report = new RunReport();
            report.AddBuild(Path.GetFullPath("Project1.csproj"), new TimeSpan(0, 0, 0, 2, 234), true);
            report.AddBuild(Path.GetFullPath("Project2.csproj"), new TimeSpan(0, 0, 0, 3, 154), false);
            report.AddTestRun(Path.GetFullPath("Project3.csproj"), Path.GetFullPath("Assembly.dll"), new TimeSpan(0, 0, 0, 6, 211), 0, 0, 0);

            var builder = new SummaryBuilder(report);
            var output = builder.Build();

            output.ToString().ShouldEqual(getResult());
        }
Пример #6
0
        public void Should_build_tooltip_string()
        {
            var report = new RunReport();

            report.AddBuild(Path.GetFullPath("Project1.csproj"), new TimeSpan(0, 0, 0, 2, 234), true);
            report.AddBuild(Path.GetFullPath("Project2.csproj"), new TimeSpan(0, 0, 0, 3, 154), false);
            report.AddTestRun(Path.GetFullPath("Project3.csproj"), Path.GetFullPath("Assembly.dll"), new TimeSpan(0, 0, 0, 6, 211), 0, 0, 0);

            var builder = new SummaryBuilder(report);
            var output  = builder.Build();

            output.ToString().ShouldEqual(getResult());
        }
        private void generateSummary(RunReport report)
        {
            if (report == null) {
                _dispatch("run-summary", new { message = "" });
                return;
            }

            var builder = new SummaryBuilder(report);
            _dispatch("run-summary", new { message = builder.Build() });
        }