-
-
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.
Merge pull request #27 from ricaun-io/develop
Version 0.5.2
- Loading branch information
Showing
7 changed files
with
103 additions
and
6 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
42 changes: 42 additions & 0 deletions
42
ricaun.Revit.UI.Tests/Items/Commands/RevitCreateItemsCommandSetTests.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,42 @@ | ||
using NUnit.Framework; | ||
|
||
namespace ricaun.Revit.UI.Tests.Items.Commands | ||
{ | ||
public class RevitCreateItemsCommandSetTests : BaseCreatePanelTests | ||
{ | ||
[TestCase("Text")] | ||
[TestCase("Command")] | ||
public void CreatePushButton_Text(string text) | ||
{ | ||
var ribbonItem = ribbonPanel.CreatePushButton<BaseCommand>(text); | ||
Assert.AreEqual(text, ribbonItem.ItemText); | ||
} | ||
|
||
[TestCase("Text")] | ||
[TestCase("Command")] | ||
public void CreatePushButton_SetText(string text) | ||
{ | ||
var ribbonItem = ribbonPanel.CreatePushButton<BaseCommand>() | ||
.SetText(text); | ||
Assert.AreEqual(text, ribbonItem.ItemText); | ||
} | ||
|
||
[TestCase("Tip")] | ||
[TestCase("ToolTip")] | ||
public void CreatePushButton_SetToolTip(string toolTip) | ||
{ | ||
var ribbonItem = ribbonPanel.CreatePushButton<BaseCommand>() | ||
.SetToolTip(toolTip); | ||
Assert.AreEqual(toolTip, ribbonItem.ToolTip); | ||
} | ||
|
||
[TestCase("Description")] | ||
[TestCase("LongDescription")] | ||
public void CreatePushButton_SetLongDescription(string longDescription) | ||
{ | ||
var ribbonItem = ribbonPanel.CreatePushButton<BaseCommand>() | ||
.SetLongDescription(longDescription); | ||
Assert.AreEqual(longDescription, ribbonItem.LongDescription); | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
ricaun.Revit.UI.Tests/Items/Commands/RevitCreateItemsCommandTests.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,44 @@ | ||
using NUnit.Framework; | ||
using System; | ||
|
||
namespace ricaun.Revit.UI.Tests.Items.Commands | ||
{ | ||
public class RevitCreateItemsCommandTests : BaseCreatePanelTests | ||
{ | ||
[Test] | ||
public void CreatePushButton() | ||
{ | ||
var ribbonItem = ribbonPanel.CreatePushButton<BaseCommand>(); | ||
Console.WriteLine(ribbonItem.Name); | ||
Assert.AreEqual(nameof(BaseCommand), ribbonItem.Name); | ||
Assert.AreEqual(nameof(BaseCommand), ribbonItem.ItemText); | ||
} | ||
|
||
[Test] | ||
public void NewPushButtonData() | ||
{ | ||
var ribbonItem = ribbonPanel.NewPushButtonData<BaseCommand>(); | ||
Console.WriteLine(ribbonItem.Name); | ||
Assert.AreEqual(nameof(BaseCommand), ribbonItem.Name); | ||
Assert.AreEqual(nameof(BaseCommand), ribbonItem.Text); | ||
} | ||
|
||
[Test] | ||
public void NewPushButtonData_Type() | ||
{ | ||
var ribbonItem = ribbonPanel.NewPushButtonData(typeof(BaseCommand)); | ||
Console.WriteLine(ribbonItem.Name); | ||
Assert.AreEqual(nameof(BaseCommand), ribbonItem.Name); | ||
Assert.AreEqual(nameof(BaseCommand), ribbonItem.Text); | ||
} | ||
|
||
[Test] | ||
public void NewToggleButtonData() | ||
{ | ||
var ribbonItem = ribbonPanel.NewToggleButtonData<BaseCommand>(); | ||
Console.WriteLine(ribbonItem.Name); | ||
Assert.AreEqual(nameof(BaseCommand), ribbonItem.Name); | ||
Assert.AreEqual(nameof(BaseCommand), ribbonItem.Text); | ||
} | ||
} | ||
} |
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