generated from PHOENIXCONTACT/MORYX-Template
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev'
- Loading branch information
Showing
7 changed files
with
105 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) 2024, Phoenix Contact GmbH & Co. KG | ||
// Licensed under the Apache License, Version 2.0 | ||
|
||
using Moryx.AbstractionLayer; | ||
|
||
namespace Moryx.ControlSystem.Cells | ||
{ | ||
/// <summary> | ||
/// Message send by the resource managment when it aborted an activity for an | ||
/// unkown session. | ||
/// </summary> | ||
public class UnknownActivityAborted : ActivityCompleted | ||
{ | ||
internal UnknownActivityAborted(IActivity aborted, Session wrapper) | ||
: base(aborted, wrapper) | ||
{ | ||
aborted.Fail(); | ||
AbortedActivity = aborted; | ||
} | ||
|
||
/// <summary> | ||
/// Activity that was aborted | ||
/// </summary> | ||
public IActivity AbortedActivity { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/Tests/Moryx.ControlSystem.Tests/VisualInstructions/VisualInstructorExtensionsTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) 2024, Phoenix Contact GmbH & Co. KG | ||
// Licensed under the Apache License, Version 2.0 | ||
|
||
using Moq; | ||
using Moryx.ControlSystem.VisualInstructions; | ||
using NUnit.Framework; | ||
using System; | ||
|
||
namespace Moryx.ControlSystem.Tests.VisualInstructions | ||
{ | ||
[TestFixture] | ||
|
||
public class VisualInstructorExtensionsTests | ||
{ | ||
[Test] | ||
public void ExtensionCreatesStringAsInstruction() | ||
{ | ||
var str = "text instruction"; | ||
|
||
var instruction = str.AsInstruction(); | ||
|
||
Assert.That(instruction.Type, Is.EqualTo(InstructionContentType.Text)); | ||
Assert.That(instruction.Content, Is.EqualTo(str)); | ||
} | ||
|
||
} | ||
} |