Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests #285

Conversation

torres6093
Copy link

No description provided.

</register>
<!-- Для использования экспорта нужно установить пакет NewPlatform.Flexberry.Reports.ExportToExcel -->
<!--
<configSections>
Copy link
Contributor

@Anisimova2020 Anisimova2020 Jun 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше вернуть отступы, чтобы потом не светилось, что в этом коммите эта строчка изменена.

И в целом в файле вроде не было изменений, лучше его вернуть к первоначальному виду.

}
}
public static IUnityContainer _container;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public static IUnityContainer _container;

    public static IServiceProvider _serviceProvider;
    
    можно сделать private и не static вроде.

@@ -14,13 +14,19 @@ namespace NewPlatform.Flexberry.ORM.ODataService.Tests
public class CustomWebApplicationFactory<TStartup> : WebApplicationFactory<TStartup>
where TStartup : class
{
public static Unity.IUnityContainer _unityContainer;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужен комментарий, почему здесь именно public static поле.

public string CustomizationString => "";

public virtual void ConfigureContainer(IUnityContainer unityContainer)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

На основании https://habr.com/ru/sandbox/123391/ сформулировать, что это за метод, чтобы потом легче было разбираться.

using Unity;

/// <summary>
/// Startup for tests.
/// </summary>
public class TestStartup : Startup
{
public static IUnityContainer _unityContainer;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вроде можно private и не статичный.

@@ -29,11 +32,17 @@ public TestStartup(IConfiguration configuration)
{
}

public override void ConfigureContainer(IUnityContainer unityContainer)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

На основании https://habr.com/ru/sandbox/123391/ сформулировать, что это за метод, чтобы потом легче было разбираться.

@Anisimova2020 Anisimova2020 merged commit 068e4be into Flexberry:feature-239-use-proper-di Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants