public async Task ShouldBeCreatedNewTag() { var faker = new Faker("pt_BR"); var newTag = new TagBuilder() .WithId(Guid.NewGuid()) .WithName(faker.Random.String2(8)) .WithAuthor(Guid.Parse("9ab3d110-71e1-418f-86eb-519146e7d702")) .Build(); await _tagRepository.CreateTagAsync(newTag); var cmdResult = await _inMemoryDbContext.SaveChangesAsync(); // Verifica se alguma linha foi afetada cmdResult.Should().BeGreaterOrEqualTo(1); var createdTag = await _tagRepository.GetByIdAsync(newTag.Id); newTag.Should().BeEquivalentTo(createdTag, options => options .Excluding(p => p.Author) .ExcludingMissingMembers()); createdTag.Author.FirstName.Should().Be("Maria"); createdTag.Author.Email.Should().Be("*****@*****.**"); createdTag.CreatedAt.Should().Be(DateTime.Now.DefaultFormat()); createdTag.UpdatedAt.Should().Be(DateTime.Now.DefaultFormat()); }