|
| 1 | +name: Bug Report |
| 2 | +description: Report a bug in ArchUnitNET |
| 3 | +title: "[Bug]: " |
| 4 | +labels: ["needs-triage", "kind/bug"] |
| 5 | +body: |
| 6 | + - type: markdown |
| 7 | + attributes: |
| 8 | + value: | |
| 9 | + Thank you for taking the time to report a bug in ArchUnitNET! |
| 10 | + Please fill out the sections below to help us resolve the issue. |
| 11 | + - type: textarea |
| 12 | + id: description |
| 13 | + attributes: |
| 14 | + label: Description |
| 15 | + description: A clear and detailed description of the bug. |
| 16 | + placeholder: What went wrong? |
| 17 | + validations: |
| 18 | + required: true |
| 19 | + - type: textarea |
| 20 | + id: minimal-working-example |
| 21 | + attributes: |
| 22 | + label: Minimal Working Example |
| 23 | + description: | |
| 24 | + Provide a minimal, reproducible example that demonstrates the bug. |
| 25 | + This should include the smallest possible code snippet and any necessary setup |
| 26 | + (e.g., test classes, ArchUnitNET rules, or configuration) needed to reproduce the issue. |
| 27 | + placeholder: | |
| 28 | + using ArchUnitNET.Domain; |
| 29 | + using ArchUnitNET.Fluent; |
| 30 | + using ArchUnitNET.Loader; |
| 31 | + using ArchUnitNET.xUnit; |
| 32 | + using Xunit; |
| 33 | + using static ArchUnitNET.Fluent.ArchRuleDefinition; |
| 34 | +
|
| 35 | + internal interface IExampleInterface { } |
| 36 | +
|
| 37 | + internal class ExampleClass : IExampleInterface { } |
| 38 | +
|
| 39 | + namespace ExampleTest |
| 40 | + { |
| 41 | + public class ExampleArchUnitTest |
| 42 | + { |
| 43 | + private static readonly Architecture Architecture = new ArchLoader() |
| 44 | + .LoadAssemblies(typeof(ExampleClass).Assembly) |
| 45 | + .Build(); |
| 46 | +
|
| 47 | + private readonly IObjectProvider<IType> ExampleLayer = Types() |
| 48 | + .That() |
| 49 | + .ResideInAssembly("ExampleAssembly") |
| 50 | + .As("Example Layer"); |
| 51 | +
|
| 52 | + private readonly IObjectProvider<Class> ExampleClasses = Classes() |
| 53 | + .That() |
| 54 | + .ImplementInterface(typeof(IExampleInterface)) |
| 55 | + .As("Example Classes"); |
| 56 | + |
| 57 | + [Fact] |
| 58 | + public void TypesShouldBeInCorrectLayer() |
| 59 | + { |
| 60 | + IArchRule exampleClassesShouldBeInExampleLayer = Classes() |
| 61 | + .That() |
| 62 | + .Are(ExampleClasses) |
| 63 | + .Should() |
| 64 | + .Be(ExampleLayer); |
| 65 | +
|
| 66 | + exampleClassesShouldBeInExampleLayer.Check(Architecture); |
| 67 | + } |
| 68 | + } |
| 69 | + } |
| 70 | + render: csharp |
| 71 | + validations: |
| 72 | + required: true |
| 73 | + - type: textarea |
| 74 | + id: expected-behavior |
| 75 | + attributes: |
| 76 | + label: Expected Behavior |
| 77 | + description: What did you expect to happen? |
| 78 | + validations: |
| 79 | + required: true |
| 80 | + - type: textarea |
| 81 | + id: actual-behavior |
| 82 | + attributes: |
| 83 | + label: Actual Behavior |
| 84 | + description: What actually happened? Include any error messages or stack traces if applicable. |
| 85 | + placeholder: | |
| 86 | + Include the full exception message and stack trace if available. |
| 87 | + validations: |
| 88 | + required: true |
| 89 | + - type: input |
| 90 | + id: archunitnet-version |
| 91 | + attributes: |
| 92 | + label: ArchUnitNET Version |
| 93 | + description: Which version of ArchUnitNET are you using? |
| 94 | + placeholder: e.g., 0.12.0 |
| 95 | + validations: |
| 96 | + required: true |
| 97 | + - type: input |
| 98 | + id: dotnet-version |
| 99 | + attributes: |
| 100 | + label: .NET Version |
| 101 | + description: Which version of .NET are you targeting? |
| 102 | + placeholder: e.g., .NET 10.0 |
| 103 | + validations: |
| 104 | + required: false |
| 105 | + - type: textarea |
| 106 | + id: additional-context |
| 107 | + attributes: |
| 108 | + label: Additional Context |
| 109 | + description: Any other context about the problem (workarounds tried, related issues, etc.). |
| 110 | + validations: |
| 111 | + required: false |
0 commit comments