post: add post about building the blog (#10)
* post: stub out initial post with outline * fix: add title attribute to lead in feed and add disc to list styles in posts * fix: apply style to artcile * post: work on rough draft * post: work on rough draft * post: work on rought draft * post: work on rought draft * post: more work on rough draft * post: finish post * chore: cleanup usings * chore: run dotnet format * docs: testing README * docs: update README.md
This commit is contained in:
@@ -1,11 +1,3 @@
|
||||
using Blog.Posts;
|
||||
|
||||
using Microsoft.AspNetCore.Hosting.Server.Features;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.AspNetCore.TestHost;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace Blog.Tests.EndToEnd;
|
||||
|
||||
public class BlogHostFactory<TProgram> : WebApplicationFactory<TProgram> where TProgram : class
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
using Microsoft.AspNetCore.Hosting.Server.Features;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
|
||||
namespace Blog.Tests.EndToEnd;
|
||||
|
||||
[TestFixture]
|
||||
|
||||
@@ -24,7 +24,7 @@ public class RssTests : BlogTest
|
||||
|
||||
using var xmlReader = XmlReader.Create(streamReader, settings);
|
||||
var feed = SyndicationFeed.Load(xmlReader);
|
||||
|
||||
|
||||
feed.Title.Text.Should().Be("journal");
|
||||
feed.Description.Text.Should().Be("A blog by Stevan Freeborn");
|
||||
feed.Items.Should().HaveCount(2);
|
||||
|
||||
@@ -10,7 +10,10 @@ global using FluentAssertions;
|
||||
|
||||
global using Microsoft.AspNetCore.Hosting;
|
||||
global using Microsoft.AspNetCore.Hosting.Server;
|
||||
global using Microsoft.AspNetCore.Hosting.Server.Features;
|
||||
global using Microsoft.AspNetCore.Http.Features;
|
||||
global using Microsoft.AspNetCore.Mvc.Testing;
|
||||
global using Microsoft.AspNetCore.TestHost;
|
||||
global using Microsoft.Extensions.DependencyInjection;
|
||||
global using Microsoft.Extensions.Hosting;
|
||||
global using Microsoft.Extensions.Logging;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Blog Tests
|
||||
|
||||
## Setup for testing
|
||||
|
||||
### Clone the repository
|
||||
|
||||
```sh
|
||||
git clone https://github.com/StevanFreeborn/blog.stevanfreeborn.com.git
|
||||
```
|
||||
|
||||
### Run the tests
|
||||
|
||||
```sh
|
||||
dotnet test
|
||||
```
|
||||
@@ -1,6 +1,7 @@
|
||||
@inherits Bunit.TestContext
|
||||
|
||||
@code {
|
||||
@code
|
||||
{
|
||||
private Mock<IPostService> _postServiceMock = new();
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@inherits Bunit.TestContext
|
||||
|
||||
@code {
|
||||
@code
|
||||
{
|
||||
[Test]
|
||||
public void Footer_WhenRendered_ItShouldRenderFooterWithNavLinks()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user