public void GetEntry_ParsesEachColumn()
        {
            var provider = CreateProvider();
            var row = CreateDataRow();

            row["QueryName"] = "Name";
            row["QueryText"] = "Text";
            row["QueryParameters"] = "Parameters";
            row["ConnectionString"] = "CustomConnectionString";
            row["Context"] = "StackTrace";
            row["QueryResults"] = "Result";
            row["QueryDuration"] = TimeSpan.FromSeconds(1).TotalSeconds;
            row["QueryResultsSize"] = 10;
            row["QueryParametersSize"] = 20;

            var entry = provider.GetEntry(row);

            var expected = new CommandEntry
            {
                BytesReceived = 10,
                BytesSent = 20,
                CustomConnectionStringName = "Custom",
                Duration = TimeSpan.FromSeconds(1),
                IsDuplicate = false,
                Name = "Name",
                Parameters = "Parameters",
                Result = "Result",
                StackTrace = "StackTrace",
                Text = "Text"
            };

            var printer = new Stateprinter();
            Assert.AreEqual(printer.PrintObject(expected), printer.PrintObject(entry));
        }
        public void GetEntry_ParsesEachColumn()
        {
            var provider = CreateProvider();
            var row = CreateDataRow();

            row["QueryName"] = "Title";
            row["QueryText"] = "Text";

            var entry = provider.GetEntry(row);

            var expected = new InformationEntry
            {
                Title = "Title",
                Text = "Text"
            };

            var printer = new Stateprinter();
            Assert.AreEqual(printer.PrintObject(expected), printer.PrintObject(entry));
        }
        public void GetEntry_ParsesEachColumn()
        {
            var provider = CreateProvider();
            var row = CreateDataRow();

            row["ConnectionString"] = "CustomConnectionString";
            row["ConnectionOp"] = "new SqlConnection()";
            row["Context"] = "StackTrace";

            var entry = provider.GetEntry(row);

            var expected = new ConnectionEntry
            {
                CustomConnectionStringName = "Custom",
                Text = "new SqlConnection()",
                StackTrace = "StackTrace"
            };

            var printer = new Stateprinter();
            Assert.AreEqual(printer.PrintObject(expected), printer.PrintObject(entry));
        }