public override async Task <AutoDto> GetById(GetAutoByIdRequest request, ServerCallContext context) { AutoManager manager = new AutoManager(); Auto auto = await manager.GetById(request.Id); AutoDto result = auto.ConvertToDto(); return(result); }
public async Task DeleteAutoTest() { var autoRequest = new GetAutoByIdRequest { Id = 1 }; var auto = await _target.GetByIdAsync(autoRequest); _target.Delete(auto); Assert.Throws <RpcException>(() => _target.GetById(autoRequest)); }