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

The tests are running too late #1215

Closed
EngRajabi opened this issue Dec 13, 2023 · 2 comments
Closed

The tests are running too late #1215

EngRajabi opened this issue Dec 13, 2023 · 2 comments

Comments

@EngRajabi
Copy link

EngRajabi commented Dec 13, 2023

Consider the following test.
It takes about 3 minutes to run.
Can I reduce this time?

    private static readonly Assembly[] AssembliesService = Assemblies
        .Where(r => r.FullName!.Contains("ind", StringComparison.OrdinalIgnoreCase) &&
                    r.FullName.Contains("service", StringComparison.OrdinalIgnoreCase))
        .ToArray();

    private static readonly Architecture Architecture =
        new ArchLoader().LoadAssemblies(AssembliesService).Build();

    private static readonly IObjectProvider<Class> EventClasses =
        Classes().That().AreAssignableTo(typeof(EventMessageBaseHandler<>)).As("EventHandler Classes");

    [Fact]
    public void EventClassesShouldHaveCorrect()
    {
        try
        {
            Classes().That().AreAssignableTo(EventClasses)
                .Should().HaveNameEndingWith("EventProcessor")
                .AndShould().BePublic()
                .AndShould().BeSealed()
                .OrShould().BeAbstract()
                .Check(Architecture);
        }
        catch (TypeDoesNotExistInArchitecture)
        {
            //ignored
        }
    }
@rweisleder
Copy link
Contributor

It looks like this issue belongs into TNG/ArchUnitNET instead of this repo?

@EngRajabi
Copy link
Author

It looks like this issue belongs into TNG/ArchUnitNET instead of this repo?

thanks

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

No branches or pull requests

2 participants