Skip to content

Commit

Permalink
Main entrypoints too tricky to test for now
Browse files Browse the repository at this point in the history
  • Loading branch information
rkm committed Oct 3, 2024
1 parent dac32d1 commit 19d40a9
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using SmiServices.Common.Execution;
using SmiServices.Common.Options;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

namespace SmiServices.Applications.DicomDirectoryProcessor
{
Expand All @@ -18,6 +19,7 @@ public static class DicomDirectoryProcessor
/// Arguments. There should be exactly one argument that specified the
/// path to the top level directory that is be searched.
/// </param>
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
int ret = SmiCliInit
Expand Down
3 changes: 3 additions & 0 deletions src/SmiServices/Applications/DicomLoader/DicomLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Diagnostics.CodeAnalysis;

namespace SmiServices.Applications.DicomLoader;

public static class DicomLoader
{
private static CancellationTokenSource? _cts;

[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
return SmiCliInit.ParseAndRun<DicomLoaderOptions>(args, nameof(DicomLoader), OnParse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public static class DynamicRulesTester
private static readonly ILogger _logger = LogManager.GetCurrentClassLogger();
private static IFileSystem _fileSystem = null!;

[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args, IFileSystem? fileSystem = null)
{
_fileSystem = fileSystem ?? new FileSystem();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

namespace SmiServices.Applications.ExtractImages
{
[ExcludeFromCodeCoverage]
public static class ExtractImages
{
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
int ret = SmiCliInit
Expand Down
2 changes: 2 additions & 0 deletions src/SmiServices/Applications/TriggerUpdates/TriggerUpdates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
using SmiServices.Common.Options;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;


namespace SmiServices.Applications.TriggerUpdates
{
public static class TriggerUpdates
{
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
int ret = SmiCliInit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using SmiServices.Common.Execution;
using SmiServices.Common.Options;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

namespace SmiServices.Microservices.CohortExtractor
{
public static class CohortExtractor
{
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
int ret = SmiCliInit.ParseAndRun<CliOptions>(args, nameof(CohortExtractor), OnParse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
using System.Collections.Generic;
using System.IO;
using System.IO.Abstractions;
using System.Diagnostics.CodeAnalysis;


namespace SmiServices.Microservices.CohortPackager
{
public static class CohortPackager
{
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
int ret = SmiCliInit.ParseAndRun<CohortPackagerCliOptions>(args, nameof(CohortPackager), OnParse);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using SmiServices.Common.Execution;
using SmiServices.Common.Options;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

namespace SmiServices.Microservices.DicomAnonymiser
{
Expand All @@ -10,6 +11,7 @@ public static class DicomAnonymiser
/// Program entry point when run from the command line
/// </summary>
/// <param name="args"></param>
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
int ret = SmiCliInit.ParseAndRun<CliOptions>(args, nameof(DicomAnonymiser), OnParse);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using SmiServices.Common.Execution;
using SmiServices.Common.Options;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

namespace SmiServices.Microservices.DicomRelationalMapper
{
public static class DicomRelationalMapper
{
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
int ret = SmiCliInit.ParseAndRun<CliOptions>(args, nameof(DicomRelationalMapper), OnParse);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using SmiServices.Common.Execution;
using SmiServices.Common.Options;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

namespace SmiServices.Microservices.DicomReprocessor
{
public static class DicomReprocessor
{
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
int ret = SmiCliInit.ParseAndRun<DicomReprocessorCliOptions>(args, nameof(DicomReprocessor), OnParse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using SmiServices.Microservices.DicomTagReader.Execution;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

namespace SmiServices.Microservices.DicomTagReader
{
Expand All @@ -13,6 +14,7 @@ public static class DicomTagReader
/// Program entry point when run from the command line
/// </summary>
/// <param name="args"></param>
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
int ret = SmiCliInit.ParseAndRun<DicomTagReaderCliOptions>(args, nameof(DicomTagReader), OnParse);
Expand Down
2 changes: 2 additions & 0 deletions src/SmiServices/Microservices/FileCopier/FileCopier.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using SmiServices.Common.Execution;
using SmiServices.Common.Options;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

namespace SmiServices.Microservices.FileCopier
{
Expand All @@ -10,6 +11,7 @@ public static class FileCopier
/// Program entry point when run from the command line
/// </summary>
/// <param name="args"></param>
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
int ret = SmiCliInit.ParseAndRun<CliOptions>(args, nameof(FileCopier), OnParse);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using SmiServices.Common.Execution;
using SmiServices.Common.Options;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

namespace SmiServices.Microservices.IdentifierMapper
{
public static class IdentifierMapper
{
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
int ret = SmiCliInit.ParseAndRun<CliOptions>(args, nameof(IdentifierMapper), OnParse);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using SmiServices.Common.Execution;
using SmiServices.Common.Options;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

namespace SmiServices.Microservices.IsIdentifiable
{
public static class IsIdentifiable
{
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using SmiServices.Common.Execution;
using SmiServices.Common.Options;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

namespace SmiServices.Microservices.MongoDBPopulator
{
Expand All @@ -9,6 +10,7 @@ public static class MongoDBPopulator
/// <summary>
/// Program entry point when run from command line
/// </summary>
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
int ret = SmiCliInit.ParseAndRun<CliOptions>(args, nameof(MongoDBPopulator), OnParse);
Expand Down
2 changes: 2 additions & 0 deletions src/SmiServices/Microservices/UpdateValues/UpdateValues.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
using SmiServices.Common.Execution;
using SmiServices.Common.Options;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;


namespace SmiServices.Microservices.UpdateValues
{
public static class UpdateValues
{
[ExcludeFromCodeCoverage]
public static int Main(IEnumerable<string> args)
{
return SmiCliInit
Expand Down

0 comments on commit 19d40a9

Please sign in to comment.