Browse Source

Merge pull request #18747 from abpframework/liangshiwei/document

Update document
pull/18748/head
maliming 2 years ago
committed by GitHub
parent
commit
80495e371e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      docs/en/Startup-Templates/Application.md
  2. 2
      docs/en/Startup-Templates/Module.md
  3. 2
      docs/en/Testing.md
  4. 2
      docs/en/Tutorials/Part-4.md
  5. 2
      docs/en/UI/Angular/Permission-Management.md
  6. 2
      docs/pt-BR/Startup-Templates/Application.md
  7. 2
      docs/pt-BR/Startup-Templates/Module.md
  8. 4
      docs/zh-Hans/Startup-Templates/Application.md
  9. 2
      docs/zh-Hans/Startup-Templates/Module.md
  10. 2
      docs/zh-Hans/Testing.md
  11. 2
      docs/zh-Hans/Tutorials/Part-4.md

4
docs/en/Startup-Templates/Application.md

@ -197,7 +197,7 @@ In addition, `.HttpApi.Client.ConsoleTestApp` is a console application (not an a
Test projects are prepared for integration testing; Test projects are prepared for integration testing;
* It is fully integrated into the ABP framework and all services in your application. * It is fully integrated into the ABP framework and all services in your application.
* It uses SQLite in-memory database for EF Core. For MongoDB, it uses the [Mongo2Go](https://github.com/Mongo2Go/Mongo2Go) library. * It uses SQLite in-memory database for EF Core. For MongoDB, it uses the [EphemeralMongo](https://github.com/asimmon/ephemeral-mongo) library.
* Authorization is disabled, so any application service can be easily used in tests. * Authorization is disabled, so any application service can be easily used in tests.
You can still create unit tests for your classes which will be harder to write (because you will need to prepare mock/fake objects), but faster to run (because it only tests a single class and skips all the initialization processes). You can still create unit tests for your classes which will be harder to write (because you will need to prepare mock/fake objects), but faster to run (because it only tests a single class and skips all the initialization processes).
@ -329,7 +329,7 @@ You should add `routes` property in the `data` object to add a link on the menu
``` ```
In the above example; In the above example;
* If the user is not logged in, authGuard blocks access and redirects to the login page. * If the user is not logged in, authGuard blocks access and redirects to the login page.
* PermissionGuard checks the user's permission with the `requiredPolicy` property of the `routes` object. If the user is not authorized to access the page, the 403 page appears. * permissionGuard checks the user's permission with the `requiredPolicy` property of the `routes` object. If the user is not authorized to access the page, the 403 page appears.
* The `name` property of `routes` is the menu link label. A localization key can be defined. * The `name` property of `routes` is the menu link label. A localization key can be defined.
* The `iconClass` property of the `routes` object is the menu link icon class. * The `iconClass` property of the `routes` object is the menu link icon class.
* The `requiredPolicy` property of the `routes` object is the required policy key to access the page. * The `requiredPolicy` property of the `routes` object is the required policy key to access the page.

2
docs/en/Startup-Templates/Module.md

@ -110,7 +110,7 @@ In addition, `.HttpApi.Client.ConsoleTestApp` is a console application (not an a
Test projects are prepared for integration testing; Test projects are prepared for integration testing;
- It is fully integrated to ABP framework and all services in your application. - It is fully integrated to ABP framework and all services in your application.
- It uses SQLite in-memory database for EF Core. For MongoDB, it uses the [Mongo2Go](https://github.com/Mongo2Go/Mongo2Go) library. - It uses SQLite in-memory database for EF Core. For MongoDB, it uses the [EphemeralMongo](https://github.com/asimmon/ephemeral-mongo) library.
- Authorization is disabled, so any application service can be easily used in tests. - Authorization is disabled, so any application service can be easily used in tests.
You can still create unit tests for your classes which will be harder to write (because you will need to prepare mock/fake objects), but faster to run (because it only tests a single class and skips all initialization process). You can still create unit tests for your classes which will be harder to write (because you will need to prepare mock/fake objects), but faster to run (because it only tests a single class and skips all initialization process).

2
docs/en/Testing.md

@ -431,7 +431,7 @@ ABP Provides a complete infrastructure to write integration tests. All the ABP i
#### The Database #### The Database
The startup template is configured to use **in-memory SQLite** database for the EF Core (for MongoDB, it uses [Mongo2Go](https://github.com/Mongo2Go/Mongo2Go) library). So, all the configuration and queries are performed against a real database and you can even test database transactions. The startup template is configured to use **in-memory SQLite** database for the EF Core (for MongoDB, it uses [EphemeralMongo](https://github.com/asimmon/ephemeral-mongo) library). So, all the configuration and queries are performed against a real database and you can even test database transactions.
Using in-memory SQLite database has two main advantages; Using in-memory SQLite database has two main advantages;

2
docs/en/Tutorials/Part-4.md

@ -64,7 +64,7 @@ Each project is used to test the related project. Test projects use the followin
{{else if DB=="Mongo"}} {{else if DB=="Mongo"}}
> **[Mongo2Go](https://github.com/Mongo2Go/Mongo2Go)** library is used to mock the MongoDB database. A separate database instance is created and seeded (with the [data seed system](../Data-Seeding.md)) to prepare a fresh database for every test. > **[EphemeralMongo](https://github.com/asimmon/ephemeral-mongo)** library is used to mock the MongoDB database. A separate database instance is created and seeded (with the [data seed system](../Data-Seeding.md)) to prepare a fresh database for every test.
{{end}} {{end}}

2
docs/en/UI/Angular/Permission-Management.md

@ -56,7 +56,7 @@ As shown above you can remove elements from DOM with `abpPermission` structural
You can use `permissionGuard` if you want to control authenticated user's permission to access to the route during navigation. You can use `permissionGuard` if you want to control authenticated user's permission to access to the route during navigation.
* Import the PermissionGuard from @abp/ng.core. * Import the permissionGuard from @abp/ng.core.
* Add `canActivate: [permissionGuard]` to your route object. * Add `canActivate: [permissionGuard]` to your route object.
* Add `requiredPolicy` to the `data` property of your route in your routing module. * Add `requiredPolicy` to the `data` property of your route in your routing module.

2
docs/pt-BR/Startup-Templates/Application.md

@ -192,7 +192,7 @@ Além disso, `.HttpApi.Client.ConsoleTestApp`é um aplicativo de console (não u
Projetos de teste são preparados para testes de integração; Projetos de teste são preparados para testes de integração;
- É totalmente integrado à estrutura ABP e a todos os serviços em sua aplicação. - É totalmente integrado à estrutura ABP e a todos os serviços em sua aplicação.
- Ele usa o banco de dados SQLite na memória para o EF Core. Para o MongoDB, ele usa a biblioteca [Mongo2Go](https://github.com/Mongo2Go/Mongo2Go) . - Ele usa o banco de dados SQLite na memória para o EF Core. Para o MongoDB, ele usa a biblioteca [EphemeralMongo](https://github.com/asimmon/ephemeral-mongo) .
- A autorização está desabilitada, portanto, qualquer serviço de aplicativo pode ser facilmente usado em testes. - A autorização está desabilitada, portanto, qualquer serviço de aplicativo pode ser facilmente usado em testes.
Você ainda pode criar testes de unidade para suas classes, que serão mais difíceis de escrever (porque você precisará preparar objetos simulados / falsos), mas mais rápidos de executar (porque apenas testa uma única classe e ignora todo o processo de inicialização). Você ainda pode criar testes de unidade para suas classes, que serão mais difíceis de escrever (porque você precisará preparar objetos simulados / falsos), mas mais rápidos de executar (porque apenas testa uma única classe e ignora todo o processo de inicialização).

2
docs/pt-BR/Startup-Templates/Module.md

@ -110,7 +110,7 @@ Além disso, `.HttpApi.Client.ConsoleTestApp`é um aplicativo de console (não u
Projetos de teste são preparados para testes de integração; Projetos de teste são preparados para testes de integração;
- É totalmente integrado à estrutura ABP e a todos os serviços em sua aplicação. - É totalmente integrado à estrutura ABP e a todos os serviços em sua aplicação.
- Ele usa o banco de dados SQLite na memória para o EF Core. Para o MongoDB, ele usa a biblioteca [Mongo2Go](https://github.com/Mongo2Go/Mongo2Go) . - Ele usa o banco de dados SQLite na memória para o EF Core. Para o MongoDB, ele usa a biblioteca [EphemeralMongo](https://github.com/asimmon/ephemeral-mongo) .
- A autorização está desabilitada, portanto, qualquer serviço de aplicativo pode ser facilmente usado em testes. - A autorização está desabilitada, portanto, qualquer serviço de aplicativo pode ser facilmente usado em testes.
Você ainda pode criar testes de unidade para suas classes, que serão mais difíceis de escrever (porque você precisará preparar objetos simulados / falsos), mas mais rápidos de executar (porque apenas testa uma única classe e ignora todo o processo de inicialização). Você ainda pode criar testes de unidade para suas classes, que serão mais difíceis de escrever (porque você precisará preparar objetos simulados / falsos), mas mais rápidos de executar (porque apenas testa uma única classe e ignora todo o processo de inicialização).

4
docs/zh-Hans/Startup-Templates/Application.md

@ -209,7 +209,7 @@ ABP有[动态 C# API 客户端](../API/Dynamic-CSharp-API-Clients.md)功能,所
测试项目是用于做集成测试的: 测试项目是用于做集成测试的:
* 它完全集成到ABP框架和应用程序的所有服务. * 它完全集成到ABP框架和应用程序的所有服务.
* 如果数据库提供程序是EF Core,测试项目会使用SQLite内存数据库,如果是MongoDB,它使用[Mongo2Go](https://github.com/Mongo2Go/Mongo2Go)库. * 如果数据库提供程序是EF Core,测试项目会使用SQLite内存数据库,如果是MongoDB,它使用[EphemeralMongo](https://github.com/asimmon/ephemeral-mongo)库.
* 授权被禁用,任何的应用服务都可以在测试中轻松调用. * 授权被禁用,任何的应用服务都可以在测试中轻松调用.
你依然可以编写单元测试,只不过它很难写(因为你需要准备mock/fake对象),但它的运行速度更快(因为只测试单个类并跳过所有初始化过程). 你依然可以编写单元测试,只不过它很难写(因为你需要准备mock/fake对象),但它的运行速度更快(因为只测试单个类并跳过所有初始化过程).
@ -314,7 +314,7 @@ ABP 配置模块也已经导入到 `AppModule` 中, 以满足可延迟加载 ABP
} }
``` ```
在上面的例子中; 在上面的例子中;
* 如果用户没有登录, AuthGuard 会阻塞访问并重定向到登录页面. * 如果用户没有登录, authGuard 会阻塞访问并重定向到登录页面.
* permissionGuard 使用 `rotues` 对象的 `requiredPolicy` 属性检查用户的权限. 如果用户未被授权访问该页, 则显示403页. * permissionGuard 使用 `rotues` 对象的 `requiredPolicy` 属性检查用户的权限. 如果用户未被授权访问该页, 则显示403页.
* `routes``name` 属性是菜单链接标签. 可以定义本地化 key. * `routes``name` 属性是菜单链接标签. 可以定义本地化 key.
* `routes` 对象的 `iconClass` 属性是菜单链接图标类. * `routes` 对象的 `iconClass` 属性是菜单链接图标类.

2
docs/zh-Hans/Startup-Templates/Module.md

@ -110,7 +110,7 @@ abp new Acme.IssueManagement -t module --no-ui
测试项目是用于做集成测试的: 测试项目是用于做集成测试的:
* 它完全集成到ABP框架和应用程序的所有服务. * 它完全集成到ABP框架和应用程序的所有服务.
* 如果数据库提供程序是EF Core,测试项目会使用SQLite内存数据库,如果是MongoDB,它使用[Mongo2Go](https://github.com/Mongo2Go/Mongo2Go)库. * 如果数据库提供程序是EF Core,测试项目会使用SQLite内存数据库,如果是MongoDB,它使用[EphemeralMongo](https://github.com/asimmon/ephemeral-mongo)库.
* 授权被禁用,任何的应用服务都可以在测试中轻松调用. * 授权被禁用,任何的应用服务都可以在测试中轻松调用.
你依然可以编写单元测试,只不过它很难写(因为你需要准备mock/fake对象),但它的运行速度更快(因为只测试单个类并跳过所有初始化过程). 你依然可以编写单元测试,只不过它很难写(因为你需要准备mock/fake对象),但它的运行速度更快(因为只测试单个类并跳过所有初始化过程).

2
docs/zh-Hans/Testing.md

@ -431,7 +431,7 @@ ABP为编写集成测试提供了完整的基础设施. 所有ABP基础设施和
#### 数据库 #### 数据库
启动模板使用EF Core配置**内存中的SQLite**数据库(对于MongoDB, 它使用[Mongo2Go](https://github.com/Mongo2Go/Mongo2Go)). 因此, 所有配置和查询都是针对真实数据库执行的, 你甚至可以测试数据库事务. 启动模板使用EF Core配置**内存中的SQLite**数据库(对于MongoDB, 它使用[EphemeralMongo](https://github.com/asimmon/ephemeral-mongo)). 因此, 所有配置和查询都是针对真实数据库执行的, 你甚至可以测试数据库事务.
使用内存中的SQLite数据库有两个主要优点: 使用内存中的SQLite数据库有两个主要优点:

2
docs/zh-Hans/Tutorials/Part-4.md

@ -67,7 +67,7 @@
{{else if DB=="Mongo"}} {{else if DB=="Mongo"}}
> **[Mongo2Go](https://github.com/Mongo2Go/Mongo2Go)**库用于模拟MongoDB数据库. 创建一个单独的数据库实例并使用[数据种子系统](../Data-Seeding.md)初始化种子数据,为每个测试准备一个新的数据库. > **[EphemeralMongo](https://github.com/asimmon/ephemeral-mongo)**库用于模拟MongoDB数据库. 创建一个单独的数据库实例并使用[数据种子系统](../Data-Seeding.md)初始化种子数据,为每个测试准备一个新的数据库.
{{end}} {{end}}

Loading…
Cancel
Save