Skip to content

Commit a8d5af6

Browse files
committed
Cleanup license stuff
Refactored unit tests
1 parent d81c52e commit a8d5af6

33 files changed

+98
-111
lines changed

CSharpCodeAnalyst.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeParser", "CodeParser\Co
1313
{7D5EA751-84A3-43F1-BCCE-C9D10536AB1B} = {7D5EA751-84A3-43F1-BCCE-C9D10536AB1B}
1414
EndProjectSection
1515
EndProject
16-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeParserTests", "CodeParserTests\CodeParserTests.csproj", "{F91511F4-5523-4886-BB60-7A8864A621C9}"
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{F91511F4-5523-4886-BB60-7A8864A621C9}"
1717
ProjectSection(ProjectDependencies) = postProject
1818
{7D5EA751-84A3-43F1-BCCE-C9D10536AB1B} = {7D5EA751-84A3-43F1-BCCE-C9D10536AB1B}
1919
{E445DF38-70F2-4972-9567-6591E1E3C833} = {E445DF38-70F2-4972-9567-6591E1E3C833}

CSharpCodeAnalyst/CSharpCodeAnalyst.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,14 @@
181181
</ItemGroup>
182182

183183
<ItemGroup>
184+
185+
<!-- Copy LICENSE file to output directory -->
186+
<None Include="..\LICENSE">
187+
<Link>LICENSE</Link>
188+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
189+
</None>
190+
191+
184192
<!-- Copy ThirdPartyNotices to output directory for license compliance -->
185193
<None Include="..\ThirdPartyNotices\**\*">
186194
<Link>ThirdPartyNotices\%(RecursiveDir)%(FileName)%(Extension)</Link>

CSharpCodeAnalyst/MainViewModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,9 @@ private void OnSnapshot()
10321032

10331033
private void OnRestore()
10341034
{
1035+
// Note we do not touch the dirty flags when restoring.
1036+
// If you refactored a new file to save is already requested.
1037+
// If not, nothing you did with the application triggered the dirty flag.
10351038
_project.RestoreSnapshot(RestoreProjectData);
10361039
}
10371040

CSharpCodeAnalyst/board.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616

1717
- Collapsed nodes should be recognized
18-
- Snapshots / restore do no care about storage state. Is this ok?
1918

2019

2120

CodeParserTests/UnitTests/AnalysisTests.cs

Lines changed: 0 additions & 65 deletions
This file was deleted.

LICENSE.txt

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ You can explore scenarios such as:
9191

9292
- What happens if you remove a code element?
9393
- What happens if you move a class to another namespace?
94+
- What happens if you cut a dependency between two code elements?
9495

9596
After your modifications, you can rerun the cycle search to observe the impact.
9697

@@ -105,6 +106,10 @@ Context Menu Options:
105106
- **Set as movement parent** – Sets the current element as the parent for subsequent move operations.
106107
- **Move** – Once a movement parent is set, this option moves the selected element and all its children to the chosen parent.
107108

109+
Additionally in the Code Explorer
110+
111+
- **Delete edge from model** – Deletes the relationships between two code elements. If the edge is bundled, multiple relationships get deleted.
112+
108113
## Validate your architectural rules
109114

110115
You can define architectural rules and check if they are violated.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using CodeParser.Parser.Config;
44
using Contracts.Graph;
55

6-
namespace CodeParserTests;
6+
namespace CodeParserTests.ApprovalTests;
77

88
public class ResolvedRelationship
99
{
@@ -59,7 +59,7 @@ public static async Task<CodeGraph> LoadAsync()
5959
/// Base class for project-focused approval tests.
6060
/// Provides common filtering and assertion methods.
6161
/// </summary>
62-
public abstract class ProjectTestBase
62+
public abstract class ApprovalTestBase
6363
{
6464

6565
protected CodeGraph Graph = null!;

CodeParserTests/ApprovalTests/BasicLanguageFeaturesApprovalTests.cs renamed to Tests/ApprovalTests/BasicLanguageFeaturesApprovalTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace CodeParserTests.ApprovalTests;
44

55
[TestFixture]
6-
public class BasicLanguageFeaturesApprovalTests : ProjectTestBase
6+
public class BasicLanguageFeaturesApprovalTests : ApprovalTestBase
77
{
88

99
[Test]

CodeParserTests/ApprovalTests/CodeExplorerApprovalTests.cs renamed to Tests/ApprovalTests/CodeExplorerApprovalTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace CodeParserTests.ApprovalTests;
44

5-
public class CodeExplorerApprovalTests : ProjectTestBase
5+
public class CodeExplorerApprovalTests : ApprovalTestBase
66
{
77
[Test]
88
public void CodeExplorer_FollowIncomingCalls_1()

0 commit comments

Comments
 (0)