Skip to content

Commit

Permalink
Updated test methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmettugur committed Sep 24, 2023
1 parent 7946caa commit d83e470
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public AuthorGrpcServiceTests()
_authorProtoModel = new AuthorProtoModel()
{
Id = Guid.NewGuid().ToString(), Name = "Jon Doe", Bio = "Developer",
DateOfBirth = Timestamp.FromDateTime(new DateTime(1990, 9, 1).ToUniversalTime())
DateOfBirth = Timestamp.FromDateTime(new DateTime(1990, 9, 1,0,0,0,DateTimeKind.Utc).ToUniversalTime())
};
var authors = new RepeatedField<AuthorProtoModel>() {_authorProtoModel};
_authorsProtoResponse = new GetAllAuthorsProtoResponse() {Authors = {authors}};
Expand All @@ -60,7 +60,7 @@ public AuthorGrpcServiceTests()
}

[Fact]
public async Task TestAddInfrastructureServices_AddInfrastructureServicesShould_GetServices()
public void TestAddInfrastructureServices_AddInfrastructureServicesShould_GetServices()
{
_serviceProvider.GetService<IMapper>().Should().NotBeNull();
_serviceProvider.GetService<IConsulClient>().Should().BeNull();
Expand Down Expand Up @@ -112,7 +112,7 @@ public async Task TestGetAuthorById_GetAuthorByIdShouldReturn_GetAuthor()
[Fact]
public async Task TestCreateAuthor_CreateAuthorShouldReturn_InsertedAuthor()
{
var request = new CreateAuthorRequest("Jon", "Doe", "Developer", new DateTime(1990, 9, 1));
var request = new CreateAuthorRequest("Jon", "Doe", "Developer", new DateTime(1990, 9, 1,0,0,0,DateTimeKind.Utc));

var protoRequest = _mapper.Map<CreateAuthorProtoRequest>(request);

Expand All @@ -129,7 +129,7 @@ public async Task TestCreateAuthor_CreateAuthorShouldReturn_InsertedAuthor()
[Fact]
public async Task TestUpdateAuthor_UpdateAuthorShouldReturn_UpdateStstusTrue()
{
var request = new UpdateAuthorRequest(Guid.NewGuid(), "Jon", "Doe", "Developer", new DateTime(1990, 9, 1));
var request = new UpdateAuthorRequest(Guid.NewGuid(), "Jon", "Doe", "Developer", new DateTime(1990, 9, 1,0,0,0,DateTimeKind.Utc));
var protoRequest = _mapper.Map<UpdateAuthorProtoRequest>(request);

var mockCall = CallHelpers.CreateAsyncUnaryCall(_updateAuthorProtoResponse);
Expand Down

0 comments on commit d83e470

Please sign in to comment.