forked from savushkin-r-d/EasyEPLANner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add multiple selection (savushkin-r-d#1235)
- Loading branch information
1 parent
51abe65
commit 9b2ba26
Showing
17 changed files
with
556 additions
and
305 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
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
35 changes: 35 additions & 0 deletions
35
EasyEplanner.Tests/TechObject.Test/ObjectsTree.Test/UserObject.Test.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,35 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Editor; | ||
using Moq; | ||
using NUnit.Framework; | ||
using TechObject; | ||
|
||
namespace TechObjectTests | ||
{ | ||
public class UserObjectTest | ||
{ | ||
[Test] | ||
public void InsertCuttedCopy() | ||
{ | ||
var techObjectManagerMock = new Mock<ITechObjectManager>(); | ||
var techObjectParentMock = new Mock<ITreeViewItem>(); | ||
|
||
techObjectParentMock.Setup(o => o.Cut(It.IsAny<TechObject.TechObject>())).Returns<TechObject.TechObject>(to => to); | ||
|
||
var userObject = new UserObject(techObjectManagerMock.Object); | ||
var techObject = new TechObject.TechObject("", GetN => 1, 1, 2, "", -1, "", "", null); | ||
techObject.Parent = techObjectParentMock.Object; | ||
|
||
var method = typeof(UserObject).GetMethod("InsertCuttedCopy", | ||
System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); | ||
|
||
method.Invoke(userObject, new object[] { techObject }); | ||
|
||
Assert.AreSame(techObject, userObject.Items.SingleOrDefault()); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.