Skip to content

Commit f38c50b

Browse files
authored
Reorganizes files and namespaces (#696)
The primary guiding principal is that functionality should be grouped by use case and not by function. So instead of grouping all `CommandRunners` together, each `ICommandRunner` instance has been moved to a folder under `Commands` that reflects the name of the command that it supports.
2 parents 630bfd8 + d3d6e54 commit f38c50b

195 files changed

Lines changed: 370 additions & 352 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Corgibytes.Freshli.Cli.Test/CommandOptions/AnalyzeCommandOptionsTest.cs renamed to Corgibytes.Freshli.Cli.Test/Commands/Analyze/AnalyzeCommandOptionsTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using System.Collections.Generic;
22
using System.CommandLine.Parsing;
3-
using Corgibytes.Freshli.Cli.Extensions;
3+
using Corgibytes.Freshli.Cli.Functionality.Extensions;
44
using Corgibytes.Freshli.Cli.Test.Common;
55
using FluentAssertions;
66
using Xunit;
77
using Xunit.Abstractions;
88

9-
namespace Corgibytes.Freshli.Cli.Test.CommandOptions;
9+
namespace Corgibytes.Freshli.Cli.Test.Commands.Analyze;
1010

1111
[IntegrationTest]
1212
public class AnalyzeCommandOptionsTest : FreshliTest

Corgibytes.Freshli.Cli.Test/CommandRunners/AnalyzeRunnerTest.cs renamed to Corgibytes.Freshli.Cli.Test/Commands/Analyze/AnalyzeRunnerTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
using System.CommandLine.IO;
44
using System.Threading;
55
using System.Threading.Tasks;
6-
using Corgibytes.Freshli.Cli.CommandOptions;
7-
using Corgibytes.Freshli.Cli.CommandRunners;
8-
using Corgibytes.Freshli.Cli.Functionality;
6+
using Corgibytes.Freshli.Cli.Commands.Analyze;
97
using Corgibytes.Freshli.Cli.Functionality.Analysis;
8+
using Corgibytes.Freshli.Cli.Functionality.Api;
109
using Corgibytes.Freshli.Cli.Functionality.Engine;
11-
using Corgibytes.Freshli.Cli.Functionality.FreshliWeb;
10+
using Corgibytes.Freshli.Cli.Functionality.Git;
11+
using Corgibytes.Freshli.Cli.Functionality.Support;
1212
using Corgibytes.Freshli.Lib;
1313
using Moq;
1414
using Xunit;
1515

16-
namespace Corgibytes.Freshli.Cli.Test.CommandRunners;
16+
namespace Corgibytes.Freshli.Cli.Test.Commands.Analyze;
1717

1818
public class AnalyzeRunnerTest
1919
{

Corgibytes.Freshli.Cli.Test/Commands/CacheCommandTest.cs renamed to Corgibytes.Freshli.Cli.Test/Commands/Cache/CacheCommandTest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
using System.CommandLine;
2-
using Corgibytes.Freshli.Cli.Commands;
32
using Corgibytes.Freshli.Cli.Commands.Cache;
43
using Corgibytes.Freshli.Cli.Test.Common;
54
using FluentAssertions;
65
using Xunit;
76
using Xunit.Abstractions;
87

9-
namespace Corgibytes.Freshli.Cli.Test.Commands;
8+
namespace Corgibytes.Freshli.Cli.Test.Commands.Cache;
109

1110
[UnitTest]
1211
public class CacheCommandTest : FreshliTest

Corgibytes.Freshli.Cli.Test/Formatters/FormatTypeTest.cs renamed to Corgibytes.Freshli.Cli.Test/Commands/Formatters/FormatTypeTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using Corgibytes.Freshli.Cli.Formatters;
4+
using Corgibytes.Freshli.Cli.Commands.Scan.Formatters;
55
using FluentAssertions;
66
using Xunit;
77

8-
namespace Corgibytes.Freshli.Cli.Test.Formatters;
8+
namespace Corgibytes.Freshli.Cli.Test.Commands.Formatters;
99

1010
[IntegrationTest]
1111
public class FormatTypeTest : HostedServicesTest

Corgibytes.Freshli.Cli.Test/Formatters/OutputFormatterTest.cs renamed to Corgibytes.Freshli.Cli.Test/Commands/Formatters/OutputFormatterTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Text.Json;
4-
using Corgibytes.Freshli.Cli.Formatters;
4+
using Corgibytes.Freshli.Cli.Commands.Scan.Formatters;
55
using Corgibytes.Freshli.Cli.Test.Common;
66
using Corgibytes.Freshli.Lib;
77
using FluentAssertions;
@@ -11,7 +11,7 @@
1111
using YamlDotNet.Serialization;
1212
using JsonSerializer = System.Text.Json.JsonSerializer;
1313

14-
namespace Corgibytes.Freshli.Cli.Test.Formatters;
14+
namespace Corgibytes.Freshli.Cli.Test.Commands.Formatters;
1515

1616
[IntegrationTest]
1717
public class OutputFormatterTest : FreshliTest

Corgibytes.Freshli.Cli.Test/Commands/MainCommandTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using System.CommandLine;
33
using Corgibytes.Freshli.Cli.Commands;
4-
using Corgibytes.Freshli.Cli.Functionality;
4+
using Corgibytes.Freshli.Cli.Functionality.Support;
55
using Corgibytes.Freshli.Cli.Test.Common;
66
using FluentAssertions;
77
using Moq;

Corgibytes.Freshli.Cli.Test/CommandOptions/ScanCommandOptionsTest.cs renamed to Corgibytes.Freshli.Cli.Test/Commands/Scan/ScanCommandOptionsTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
using System.CommandLine.Parsing;
33
using System.IO;
44
using System.Linq;
5-
using Corgibytes.Freshli.Cli.Extensions;
6-
using Corgibytes.Freshli.Cli.Formatters;
7-
using Corgibytes.Freshli.Cli.OutputStrategies;
5+
using Corgibytes.Freshli.Cli.Commands.Scan.Formatters;
6+
using Corgibytes.Freshli.Cli.Commands.Scan.OutputStrategies;
7+
using Corgibytes.Freshli.Cli.Functionality.Extensions;
88
using Corgibytes.Freshli.Cli.Test.Common;
99
using FluentAssertions;
1010
using Xunit;
1111
using Xunit.Abstractions;
1212

13-
namespace Corgibytes.Freshli.Cli.Test.CommandOptions;
13+
namespace Corgibytes.Freshli.Cli.Test.Commands.Scan;
1414

1515
[IntegrationTest]
1616
public class ScanCommandOptionsTest : FreshliTest

Corgibytes.Freshli.Cli.Test/Commands/ScanCommandTest.cs renamed to Corgibytes.Freshli.Cli.Test/Commands/Scan/ScanCommandTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using System.CommandLine;
22
using System.Linq;
3-
using Corgibytes.Freshli.Cli.Commands;
3+
using Corgibytes.Freshli.Cli.Commands.Scan;
44
using Corgibytes.Freshli.Cli.Test.Common;
55
using FluentAssertions;
66
using Xunit;
77
using Xunit.Abstractions;
88

9-
namespace Corgibytes.Freshli.Cli.Test.Commands;
9+
namespace Corgibytes.Freshli.Cli.Test.Commands.Scan;
1010

1111
[UnitTest]
1212
public class ScanCommandTest : FreshliTest

Corgibytes.Freshli.Cli.Test/Helpers/CallHelpers.cs renamed to Corgibytes.Freshli.Cli.Test/Common/GrpcCalls.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
using System.Threading.Tasks;
2525
using Grpc.Core;
2626

27-
namespace Corgibytes.Freshli.Cli.Test.Helpers;
27+
namespace Corgibytes.Freshli.Cli.Test.Common;
2828

29-
internal static class CallHelpers
29+
internal static class GrpcCalls
3030
{
3131
// ReSharper disable once UnusedMember.Global
3232
public static AsyncUnaryCall<TResponse> CreateAsyncUnaryCall<TResponse>(TResponse response)

Corgibytes.Freshli.Cli.Test/Functionality/AgentsDetectorTest.cs renamed to Corgibytes.Freshli.Cli.Test/Functionality/Agents/AgentsDetectorTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using System.Collections.Generic;
2-
using Corgibytes.Freshli.Cli.Commands;
3-
using Corgibytes.Freshli.Cli.Functionality;
2+
using Corgibytes.Freshli.Cli.Functionality.Agents;
3+
using Corgibytes.Freshli.Cli.Functionality.Support;
44
using Moq;
55
using Xunit;
66

7-
namespace Corgibytes.Freshli.Cli.Test.Functionality;
7+
namespace Corgibytes.Freshli.Cli.Test.Functionality.Agents;
88

99
[UnitTest]
1010
public class AgentsDetectorTest

0 commit comments

Comments
 (0)