Skip to content

Commit

Permalink
Rename tests as per SSW Rules (#212)
Browse files Browse the repository at this point in the history
* Update UnitTests test names

* Update IntegrationTests test name

* Update architecture test names
  • Loading branch information
christoment authored Dec 6, 2023
1 parent e5296d6 commit dfcf4ef
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
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

0 comments on commit dfcf4ef

Please sign in to comment.