0
jasenfici@gmail.com created
- ABP Framework version: v8.2.0 or 8.2.1
- UI Type: MVC
- Database System: EF Core (SQL Server)
- Tiered (for MVC): yno
- Exception message and full stack trace:
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.5.3.1+6b60a9e56a (64-bit .NET 8.0.7)
[xUnit.net 00:00:00.06] Starting: MvcBasicTheme.EntityFrameworkCore.Tests
[xUnit.net 00:00:06.84] MvcBasicTheme.EntityFrameworkCore.Applications.TeamInvites.EfCoreTeamInvitesAppServiceTests.UpdateAsync [FAIL]
[xUnit.net 00:00:06.84] Volo.Abp.Validation.AbpValidationException : Method arguments are not valid! See ValidationErrors for details.
[xUnit.net 00:00:06.84] Stack Trace:
[xUnit.net 00:00:06.84] at Volo.Abp.Validation.MethodInvocationValidator.ThrowValidationError(MethodInvocationValidationContext context)
[xUnit.net 00:00:06.84] at Volo.Abp.Validation.MethodInvocationValidator.ValidateAsync(MethodInvocationValidationContext context)
[xUnit.net 00:00:06.84] at Volo.Abp.Validation.ValidationInterceptor.ValidateAsync(IAbpMethodInvocation invocation)
[xUnit.net 00:00:06.84] at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
[xUnit.net 00:00:06.84] at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
[xUnit.net 00:00:06.84] at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
[xUnit.net 00:00:06.84] at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
[xUnit.net 00:00:06.84] at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
[xUnit.net 00:00:06.84] at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
[xUnit.net 00:00:06.84] C:\src\abp\MvcBasicTheme\test\MvcBasicTheme.Application.Tests\TeamInvites\TeamInviteApplicationTests.cs(87,0): at MvcBasicTheme.TeamInvites.TeamInvitesAppServiceTests`1.UpdateAsync()
[xUnit.net 00:00:06.84] --- End of stack trace from previous location ---
[xUnit.net 00:00:08.41] Finished: MvcBasicTheme.EntityFrameworkCore.Tests
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.5.3.1+6b60a9e56a (64-bit .NET 8.0.7)
[xUnit.net 00:00:00.05] Starting: MvcBasicTheme.Web.Tests
[xUnit.net 00:00:06.98] Finished: MvcBasicTheme.Web.Tests
========== Test run finished: 11 Tests (10 Passed, 1 Failed, 0 Skipped) run in 8.4 sec ==========
- Steps to reproduce the issue:
- Start "abp suite"
- Create a new MVC project
- Create your first entity
- Run tests from Visual Studio
I have a zip file of a sample project that was created which causes this error when running tests. I can't trace into the test to get more detailed information unfortunately.
Let me know if you want to sample.
jasen
4 Answer(s)
-
0
hi
Please share your project to liming.ma@volosoft.com via https://wetransfer.com/
Thanks
-
0
hi
The EmailAddress is required for
TeamInviteUpdateDto
[Required] [EmailAddress] [StringLength(TeamInviteConsts.EmailAddressMaxLength)] public string EmailAddress { get; set; } = null!;
[Fact] public async Task UpdateAsync() { // Arrange var input = new TeamInviteUpdateDto() { ExpirationDate = new DateTime(2016, 1, 15), IsOwner = true, IsBilling = true, Accepted = true }; // Act var serviceResult = await _teamInvitesAppService.UpdateAsync(1, input); // Assert var result = await _teamInviteRepository.FindAsync(c => c.Id == serviceResult.Id); result.ShouldNotBe(null); result.ExpirationDate.ShouldBe(new DateTime(2016, 1, 15)); result.IsOwner.ShouldBe(true); result.IsBilling.ShouldBe(true); result.Accepted.ShouldBe(true); }
-
0
Ok I will look to change but this is autogenerated code that should work out of the box no?
-
0
Yes, I will ask our suite team.