Skip to content

refactor: Added warning when solution is not provided #82

refactor: Added warning when solution is not provided

refactor: Added warning when solution is not provided #82

GitHub Actions / xUnit tests succeeded Jan 1, 2024 in 1s

xUnit tests ✅

Tests passed successfully

Report Passed Failed Skipped Time
./test/Test.Utils.Test/TestResults/test_results.trx 2✅ 5s
./test/TwinGet.Cli.FuncTest/TestResults/test_results.trx 3✅ 53s
./test/TwinGet.Core.Test/TestResults/test_results.trx 23✅ 64s
./test/TwinGet.TwincatInterface.Test/TestResults/test_results.trx 50✅ 85s
./test/TwinGet.Utils.Test/TestResults/test_results.trx 1✅ 2s

✅ ./test/Test.Utils.Test/TestResults/test_results.trx

2 tests were completed in 5s with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Test.Utils.Test.TestTwincatProjectTests 1✅ 134ms
Test.Utils.Test.TestTwingetExeTests 1✅ 7ms

✅ Test.Utils.Test.TestTwincatProjectTests

✅ TestTwincatProject_ShouldBeValid

✅ Test.Utils.Test.TestTwingetExeTests

✅ Path_ShouldExists

✅ ./test/TwinGet.Cli.FuncTest/TestResults/test_results.trx

3 tests were completed in 53s with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
TwinGet.Cli.FuncTest.Commands.PackCommandTests 3✅ 48s

✅ TwinGet.Cli.FuncTest.Commands.PackCommandTests

✅ Pack_WithManagedPlcProject_ShouldSucceed(provideSolution: False)
✅ Pack_WithManagedPlcProject_ShouldSucceed(provideSolution: True)
✅ Pack_WithUnmanagedPlcProject_ShouldFail

✅ ./test/TwinGet.Core.Test/TestResults/test_results.trx

23 tests were completed in 64s with 23 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
TwinGet.Core.Test.Commands.PackCommandHanderTests 5✅ 265ms
TwinGet.Core.Test.Commands.PackCommandValidatorTests 6✅ 273ms
TwinGet.Core.Test.Packaging.PackageServiceTests 8✅ 59s
TwinGet.Core.Test.Packaging.UtilsTests 4✅ 10ms

✅ TwinGet.Core.Test.Commands.PackCommandHanderTests

✅ Handle_ShouldDeletegateToPackageServiceAsync
✅ Handle_WithNoOutputDirectory_ShouldSetToCurrentDirectoryAsync
✅ Handle_WithRelativeOutputDirectoryPath_ShouldGetFullPathAsync
✅ Handle_WithRelativePath_ShouldGetFullPathAsync
✅ Handle_WithRelativeSolutionPath_ShouldGetFullPathAsync

✅ TwinGet.Core.Test.Commands.PackCommandValidatorTests

✅ ShouldHaveError_WhenPathDoesNotExistAsync
✅ ShouldHaveError_WhenPathIsNotValidAsync
✅ ShouldHaveError_WhenPathIsNullAsync
✅ ShouldHaveError_WhenPlcProjectDoesNotBelongToSolutionAsync
✅ ShouldHaveError_WhenSolutionIsProvidedAndDoesNotExistAsync
✅ ShouldWarn_WhenNoSolutionWasProvided

✅ TwinGet.Core.Test.Packaging.PackageServiceTests

✅ Pack_WithNoOutputDirectory_ShouldThrow
✅ Pack_WithNoPath_ShouldThrow
✅ Pack_WithValidParameters_ShouldSucceed(provideSolution: False)
✅ Pack_WithValidParameters_ShouldSucceed(provideSolution: True)
✅ PackAsync_WithNoOutputDirectory_ShouldThrowAsync
✅ PackAsync_WithNoPath_ShouldThrowAsync
✅ PackAsync_WithValidParameters_ShouldSucceedAsync(provideSolution: False)
✅ PackAsync_WithValidParameters_ShouldSucceedAsync(provideSolution: True)

✅ TwinGet.Core.Test.Packaging.UtilsTests

✅ IsSupportedFileType_ShouldWork(file: "bar.nuspec", expected: True)
✅ IsSupportedFileType_ShouldWork(file: "foo.bar", expected: False)
✅ IsSupportedFileType_ShouldWork(file: "foo.csproj", expected: False)
✅ IsSupportedFileType_ShouldWork(file: "foo.plcproj", expected: True)

✅ ./test/TwinGet.TwincatInterface.Test/TestResults/test_results.trx

50 tests were completed in 85s with 50 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
TwinGet.TwincatInterface.Test.AutomationInterfaceTests 10✅ 81s
TwinGet.TwincatInterface.Test.ProjectFileUtils.PlcProjectFileHelperTests 11✅ 155ms
TwinGet.TwincatInterface.Test.ProjectFileUtils.TcSmProjectFileHelperTests 8✅ 106ms
TwinGet.TwincatInterface.Test.TwincatConstantsTests 2✅ 6ms
TwinGet.TwincatInterface.Test.TwincatProjectTests 3✅ 41s
TwinGet.TwincatInterface.Test.Utils.TwincatUtilsTests 16✅ 222ms

✅ TwinGet.TwincatInterface.Test.AutomationInterfaceTests

✅ GetPlcProjects_WithASolutionOpened_ShouldGetAll
✅ LoadSolution_WithEmptyPath_ShouldThrow
✅ LoadSolution_WithInvalidPath_ShouldThrow
✅ LoadSolution_WithValidPath_ShouldLoadSuccessfully
✅ PathExists_ShouldSupportRelativePath
✅ ProgId_ShouldBeValid
✅ ProgId_ShouldNotBeNullOrEmpty
✅ SavePlcProject_WithoutSolutionPath_ShouldSucceed
✅ SavePlcProject_WithValidParams_ShouldSucceed
✅ TwincatProjects_ShouldBeConsistent

✅ TwinGet.TwincatInterface.Test.ProjectFileUtils.PlcProjectFileHelperTests

✅ GetParentSolutionFileAsync_SpecsAsync(actualDepth: 3, searchDepth: 5, resultIsEmpty: False)
✅ GetParentSolutionFileAsync_SpecsAsync(actualDepth: 5, searchDepth: 5, resultIsEmpty: False)
✅ GetParentSolutionFileAsync_SpecsAsync(actualDepth: 6, searchDepth: 5, resultIsEmpty: True)
✅ GetParentTwincatFile_Specs(actualDepth: 3, searchDepth: 5, resultIsEmpty: False)
✅ GetParentTwincatFile_Specs(actualDepth: 5, searchDepth: 5, resultIsEmpty: False)
✅ GetParentTwincatFile_Specs(actualDepth: 6, searchDepth: 5, resultIsEmpty: True)
✅ GetParentTwincatFileAsync_SpecsAsync(actualDepth: 3, searchDepth: 5, resultIsEmpty: False)
✅ GetParentTwincatFileAsync_SpecsAsync(actualDepth: 5, searchDepth: 5, resultIsEmpty: False)
✅ GetParentTwincatFileAsync_SpecsAsync(actualDepth: 6, searchDepth: 5, resultIsEmpty: True)
✅ Guid_ShouldWork
✅ GuidAsync_ShouldWorkAsync

✅ TwinGet.TwincatInterface.Test.ProjectFileUtils.TcSmProjectFileHelperTests

✅ GetParentSolutionFile_Specs(actualDepth: 3, searchDepth: 5, resultIsEmpty: False)
✅ GetParentSolutionFile_Specs(actualDepth: 5, searchDepth: 5, resultIsEmpty: False)
✅ GetParentSolutionFile_Specs(actualDepth: 6, searchDepth: 5, resultIsEmpty: True)
✅ GetParentSolutionFile_SpecsAsync(actualDepth: 3, searchDepth: 5, resultIsEmpty: False)
✅ GetParentSolutionFile_SpecsAsync(actualDepth: 5, searchDepth: 5, resultIsEmpty: False)
✅ GetParentSolutionFile_SpecsAsync(actualDepth: 6, searchDepth: 5, resultIsEmpty: True)
✅ Guid_ShouldWork
✅ GuidAsync_ShouldWorkAsync

✅ TwinGet.TwincatInterface.Test.TwincatConstantsTests

✅ SupportedProgIds_ShouldNotBeEmpty
✅ TwincatXaeDownloadUrl_ShouldNotBeNullOrEmpty

✅ TwinGet.TwincatInterface.Test.TwincatProjectTests

✅ Construct_WithNonTwincatProject_ShouldThrow
✅ Construct_WithTwincatProject_ShouldSucceed
✅ PlcProjects_ShouldBeExpected

✅ TwinGet.TwincatInterface.Test.Utils.TwincatUtilsTests

✅ DeserializeXmlFileToProjectData_WithValidPlcProjectFile_ShouldSucceed(xmlContent: "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Pro"···, expected: [["Name"] = "TestPlcProject1", ["Title"] = "", ["Version"] = ""])
✅ DeserializeXmlFileToProjectData_WithValidPlcProjectFile_ShouldSucceed(xmlContent: "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Pro"···, expected: [["Name"] = "TestPlcProject1", ["Title"] = "TwinGet.TestTwincatProject1.TestPlcProject1", ["Version"] = "0.1.0"])
✅ DeserializeXmlFileToProjectDataAsync_WithValidTwincatProjectFile_ShouldSucceedAsync(xmlContent: "<?xml version=\"1.0\"?>\r\n<TcSmProject xmlns:xsi="···, expectedProperties: [["TcVersion"] = "3.1.4024.53"], plcProjectNames: ["TestPlcProject1", "TestPlcProject2"])
✅ DeserializeXmlFileToProjectDataAsync_WithValidTwincatProjectFile_ShouldSucceedAsync(xmlContent: "<?xml version=\"1.0\"?>\r\n<TcSmProject xmlns:xsi="···, expectedProperties: [["TcVersion"] = "3.1.4024.53"], plcProjectNames: [])
✅ IsPlcProjectFileExtension_ShouldWork(filePath: ".", expected: False)
✅ IsPlcProjectFileExtension_ShouldWork(filePath: "bar.plcproj", expected: True)
✅ IsPlcProjectFileExtension_ShouldWork(filePath: "foo.bar", expected: False)
✅ IsPlcProjectFileExtension_ShouldWork(filePath: "foo.plcproj", expected: True)
✅ IsPlcProjectFileExtension_ShouldWork(filePath: "foo", expected: False)
✅ IsTwincatProjectFileExtension_ShouldWork(filePath: ".", expected: False)
✅ IsTwincatProjectFileExtension_ShouldWork(filePath: "foo.bar", expected: False)
✅ IsTwincatProjectFileExtension_ShouldWork(filePath: "foo.tspproj", expected: True)
✅ IsTwincatProjectFileExtension_ShouldWork(filePath: "foo.tsproj", expected: True)
✅ IsTwincatProjectFileExtension_ShouldWork(filePath: "foo", expected: False)
✅ PlcProjectBelongToSolution_WithRelatedFiles_ShouldBeTrue
✅ PlcProjectBelongToSolution_WithUnrelatedFiles_ShouldBeFalse

✅ ./test/TwinGet.Utils.Test/TestResults/test_results.trx

1 tests were completed in 2s with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
TwinGet.Utils.Test.IOTests.DirectoryTests 1✅ 21ms

✅ TwinGet.Utils.Test.IOTests.DirectoryTests

✅ CopyDirectory_Recursively