Compare commits

..

No commits in common. "df348bea5ae9b04e0ba4fe14b6464aa8837a9c11" and "fd60906a200e67f82d98eb367518db0a81a42985" have entirely different histories.

2 changed files with 7 additions and 18 deletions

View File

@ -36,19 +36,11 @@ public class HtmlPageReader
private string ReadSiteContent(string url)
{
using var client = new HttpClient();
try
{
var html = client.GetStringAsync(url);
html.Wait();
var html = client.GetStringAsync(url);
html.Wait();
var content = html.Result;
return content;
}
catch (Exception ex)
{
Console.WriteLine($"Failed to connect to '{url}'. {ex.Message}");
return "";
}
var content = html.Result;
return content;
}
public string GetSiteContent()

View File

@ -23,8 +23,7 @@ public class ArticlesTableTests
public void ArticlesListTest()
{
var cfg = GetConfiguration();
var dbconn = cfg.GetConnectionString("Database");
var client = new ArticlesTable(dbconn ?? "");
var client = new ArticlesTable(cfg);
client.List(0, 25);
}
@ -34,8 +33,7 @@ public class ArticlesTableTests
var uid = Guid.Parse("4ac46772-253c-4c3d-8a2c-29239abd2ad4");
var cfg = GetConfiguration();
var dbconn = cfg.GetConnectionString("Database");
var client = new ArticlesTable(dbconn ?? "");
var client = new ArticlesTable(cfg);
var res = client.GetById(uid);
if (!res.Id.Equals(uid))
{
@ -47,8 +45,7 @@ public class ArticlesTableTests
public void NewRecordTest()
{
var cfg = GetConfiguration();
var dbconn = cfg.GetConnectionString("Database");
var client = new ArticlesTable(dbconn ?? "");
var client = new ArticlesTable(cfg);
var m = new ArticlesEntity
{
Id = Guid.NewGuid(),