Skip to content

Commit

Permalink
Command line app for managing plugins (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
k3ldar committed Oct 29, 2023
1 parent 753b8b4 commit 02edb7c
Show file tree
Hide file tree
Showing 37 changed files with 1,189 additions and 136 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<Description>GCode Sender and Analyzer</Description>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<DebugType>embedded</DebugType>
<NeutralLanguage>en-GB</NeutralLanguage>
</PropertyGroup>

<PropertyGroup>
Expand Down
10 changes: 10 additions & 0 deletions src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_lambdas = true:silent

# IDE0066: Convert switch statement to expression
dotnet_diagnostic.IDE0066.severity = none
csharp_style_prefer_primary_constructors = true:suggestion
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_prefer_switch_expression = false:silent

[*.{cs,vb}]
#### Naming styles ####

Expand Down Expand Up @@ -71,3 +77,7 @@ dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
indent_size = 4
end_of_line = crlf
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
32 changes: 32 additions & 0 deletions src/GCATests/GSendCS/CommandLineOptionsTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System.Diagnostics.CodeAnalysis;

using GSendCS.Internal;

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace GSendTests.GSendCS
{
[TestClass]
[ExcludeFromCodeCoverage]
public sealed class CommandLineOptionsTests
{
[TestMethod]
public void Validate_CommandLineOptions_ReturnsCorrectValues_Success()
{
CommandLineOptions sut = new();
Assert.IsNotNull(sut);
Assert.IsTrue(sut.ShowVerbosity);
Assert.IsTrue(sut.ShowHelpMessage);
Assert.AreEqual(" ", sut.SubOptionPrefix);
Assert.AreEqual(20, sut.SubOptionMinimumLength);
Assert.AreEqual(" ", sut.SubOptionSuffix);
Assert.AreEqual(" ", sut.ParameterPrefix);
Assert.AreEqual(18, sut.ParameterMinimumLength);
Assert.AreEqual(" ", sut.ParameterSuffix);
Assert.AreEqual(22, sut.InternalOptionsMinimumLength);
Assert.IsTrue(sut.CaseSensitiveOptionNames);
Assert.IsFalse(sut.CaseSensitiveSubOptionNames);
Assert.IsFalse(sut.CaseSensitiveParameterNames);
}
}
}
Loading

0 comments on commit 02edb7c

Please sign in to comment.