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.
Add extension to create strings
.AsInstruction()
.
- Loading branch information
1 parent
5e245c5
commit 27a2c4a
Showing
2 changed files
with
45 additions
and
1 deletion.
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
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)); | ||
} | ||
|
||
} | ||
} |