Skip to content

Commit

Permalink
Merge pull request #18747 from abpframework/liangshiwei/document
Browse files Browse the repository at this point in the history
Update document
  • Loading branch information
maliming authored Jan 11, 2024
2 parents 1b6a003 + d9a00ab commit 80495e3
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions docs/en/Startup-Templates/Application.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ In addition, `.HttpApi.Client.ConsoleTestApp` is a console application (not an a
Test projects are prepared for integration testing;

* 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.

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).
Expand Down Expand Up @@ -329,7 +329,7 @@ You should add `routes` property in the `data` object to add a link on the menu
```
In the above example;
* 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 `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.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/Startup-Templates/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ In addition, `.HttpApi.Client.ConsoleTestApp` is a console application (not an a
Test projects are prepared for integration testing;

- 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.

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).
Expand Down
2 changes: 1 addition & 1 deletion docs/en/Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ ABP Provides a complete infrastructure to write integration tests. All the ABP i

#### 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;

Expand Down
2 changes: 1 addition & 1 deletion docs/en/Tutorials/Part-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Each project is used to test the related project. Test projects use the followin
{{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}}

Expand Down
2 changes: 1 addition & 1 deletion docs/en/UI/Angular/Permission-Management.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

* Import the PermissionGuard from @abp/ng.core.
* Import the permissionGuard from @abp/ng.core.
* Add `canActivate: [permissionGuard]` to your route object.
* Add `requiredPolicy` to the `data` property of your route in your routing module.

Expand Down
2 changes: 1 addition & 1 deletion docs/pt-BR/Startup-Templates/Application.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;

- É 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.

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).
Expand Down
2 changes: 1 addition & 1 deletion docs/pt-BR/Startup-Templates/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;

- É 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.

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).
Expand Down
4 changes: 2 additions & 2 deletions docs/zh-Hans/Startup-Templates/Application.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ ABP有[动态 C# API 客户端](../API/Dynamic-CSharp-API-Clients.md)功能,所
测试项目是用于做集成测试的:

* 它完全集成到ABP框架和应用程序的所有服务.
* 如果数据库提供程序是EF Core,测试项目会使用SQLite内存数据库,如果是MongoDB,它使用[Mongo2Go](https://github.com/Mongo2Go/Mongo2Go)库.
* 如果数据库提供程序是EF Core,测试项目会使用SQLite内存数据库,如果是MongoDB,它使用[EphemeralMongo](https://github.com/asimmon/ephemeral-mongo)库.
* 授权被禁用,任何的应用服务都可以在测试中轻松调用.

你依然可以编写单元测试,只不过它很难写(因为你需要准备mock/fake对象),但它的运行速度更快(因为只测试单个类并跳过所有初始化过程).
Expand Down Expand Up @@ -314,7 +314,7 @@ ABP 配置模块也已经导入到 `AppModule` 中, 以满足可延迟加载 ABP
}
```
在上面的例子中;
* 如果用户没有登录, AuthGuard 会阻塞访问并重定向到登录页面.
* 如果用户没有登录, authGuard 会阻塞访问并重定向到登录页面.
* permissionGuard 使用 `rotues` 对象的 `requiredPolicy` 属性检查用户的权限. 如果用户未被授权访问该页, 则显示403页.
* `routes``name` 属性是菜单链接标签. 可以定义本地化 key.
* `routes` 对象的 `iconClass` 属性是菜单链接图标类.
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-Hans/Startup-Templates/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ abp new Acme.IssueManagement -t module --no-ui
测试项目是用于做集成测试的:

* 它完全集成到ABP框架和应用程序的所有服务.
* 如果数据库提供程序是EF Core,测试项目会使用SQLite内存数据库,如果是MongoDB,它使用[Mongo2Go](https://github.com/Mongo2Go/Mongo2Go)库.
* 如果数据库提供程序是EF Core,测试项目会使用SQLite内存数据库,如果是MongoDB,它使用[EphemeralMongo](https://github.com/asimmon/ephemeral-mongo)库.
* 授权被禁用,任何的应用服务都可以在测试中轻松调用.

你依然可以编写单元测试,只不过它很难写(因为你需要准备mock/fake对象),但它的运行速度更快(因为只测试单个类并跳过所有初始化过程).
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-Hans/Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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数据库有两个主要优点:

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-Hans/Tutorials/Part-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
{{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}}

Expand Down

0 comments on commit 80495e3

Please sign in to comment.