Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename tests as per SSW Rules #212

Merged
merged 4 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/Architecture.Tests/DatabaseEntitiesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace SSW.CleanArchitecture.Architecture.UnitTests;
public class DatabaseEntities
{
[Fact]
public void Entities_Should_Inherits_BaseComponent()
public void Entities_ShouldInheritsBaseComponent()
{
var entityTypes = Types.InAssembly(typeof(DependencyInjection).Assembly)
.That()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class TodoItemByTitleSpecTests
[InlineData("Banana")]
[InlineData("Apple 2")]
[InlineData("Banana 2")]
public void Should_Return_ByTitle(string textToSearch)
public void Query_ShouldReturnByTitle(string textToSearch)
{
var query = new TodoItemByTitleSpec(textToSearch);
var result = query.Evaluate(_entities).ToList();
Expand Down
10 changes: 5 additions & 5 deletions tests/Domain.UnitTests/TodoItems/TodoItemTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace SSW.CleanArchitecture.Domain.UnitTests.TodoItems;
public class TodoItemTests
{
[Fact]
public void Create_Should_Succeed_When_Title_Valid()
public void Create_WithValidTitle_ShouldSucceed()
{
// Arrange
var title = "title";
Expand All @@ -20,7 +20,7 @@ public void Create_Should_Succeed_When_Title_Valid()
}

[Fact]
public void Create_Should_Throw_When_Title_Null()
public void Create_WithNullTitle_ShouldThrow()
{
// Arrange
string? title = null;
Expand All @@ -33,7 +33,7 @@ public void Create_Should_Throw_When_Title_Null()
}

[Fact]
public void Create_Should_Raise_Domain_Event()
public void Create_ShouldRaiseDomainEvent()
{
// Act
var todoItem = TodoItem.Create("title");
Expand All @@ -45,7 +45,7 @@ public void Create_Should_Raise_Domain_Event()
}

[Fact]
public void Complete_Should_Set_Done()
public void Complete_ShouldSetDone()
{
// Arrange
var todoItem = TodoItem.Create("title");
Expand All @@ -58,7 +58,7 @@ public void Complete_Should_Set_Done()
}

[Fact]
public void Complete_Should_Raise_Domain_Event()
public void Complete_ShouldRaiseDomainEvent()
{
// Arrange
var todoItem = TodoItem.Create("title");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class CreateTodoItemCommandTests(TestingDatabaseFixture fixture, ITestOut
: IntegrationTestBase(fixture, output)
{
[Fact]
public async Task ShouldRequireUniqueTitle()
public async Task Command_ShouldRequireUniqueTitle()
{
// Arrange
var cmd = new CreateTodoItemCommand("Shopping");
Expand All @@ -32,7 +32,7 @@ public async Task ShouldRequireUniqueTitle()
}

[Fact]
public async Task ShouldCreateTodoItem()
public async Task Command_ShouldCreateTodoItem()
{
// Arrange
var cmd = new CreateTodoItemCommand("Shopping");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class GetAllTodoItemsQueryTests(TestingDatabaseFixture fixture, ITestOutp
: IntegrationTestBase(fixture, output)
{
[Fact]
public async Task Should_Return_All_TodoItems()
public async Task Query_ShouldReturnAllTodoItems()
{
// Arrange
const int entityCount = 10;
Expand Down