-
-
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.
- Loading branch information
Showing
10 changed files
with
135 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<Version>0.6.0-rc</Version> | ||
<Version>0.6.0-rc.2</Version> | ||
</PropertyGroup> | ||
</Project> |
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
Binary file not shown.
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,30 @@ | ||
using NUnit.Framework; | ||
using System; | ||
|
||
namespace ricaun.Revit.UI.Tests.Resources | ||
{ | ||
public class ResourcePngTests | ||
{ | ||
const string ResourceNamePng = "Resources/Images/Revit32.png"; | ||
|
||
[Test] | ||
public void GetBitmapSource_NotNull_Png() | ||
{ | ||
Console.WriteLine(ResourceNamePng.GetBitmapSource()); | ||
Assert.IsNotNull(ResourceNamePng.GetBitmapSource()); | ||
Assert.IsNotNull(("/" + ResourceNamePng).GetBitmapSource()); | ||
} | ||
|
||
[TestCase(15, 15)] | ||
[TestCase(16, 16)] | ||
[TestCase(31, 31)] | ||
[TestCase(32, 32)] | ||
[TestCase(48, 32)] | ||
[TestCase(64, 32)] | ||
public void GetBitmapFrame_Width_ScaleDown(int width, int expected) | ||
{ | ||
var source = ResourceNamePng.GetBitmapSource().GetBitmapFrame(width); | ||
Assert.AreEqual(expected, (int)Math.Round(source.Width)); | ||
} | ||
} | ||
} |
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,39 @@ | ||
using NUnit.Framework; | ||
using System; | ||
|
||
namespace ricaun.Revit.UI.Tests.Resources | ||
{ | ||
public class ResourcesFramesTests | ||
{ | ||
const string ResourceNameIcoFrames = "Resources/Images/Revit21Frames.ico"; | ||
|
||
[Test] | ||
public void Frames_GetBitmapSource_NotNull() | ||
{ | ||
Console.WriteLine(ResourceNameIcoFrames.GetBitmapSource()); | ||
Assert.IsNotNull(ResourceNameIcoFrames.GetBitmapSource()); | ||
Assert.IsNotNull(("/" + ResourceNameIcoFrames).GetBitmapSource()); | ||
} | ||
|
||
[TestCase(256)] | ||
public void Frames_GetBitmapSource_Width(int width) | ||
{ | ||
var source = ResourceNameIcoFrames.GetBitmapSource(); | ||
Assert.AreEqual(width, source.Width); | ||
} | ||
|
||
[TestCase(0, 16)] | ||
[TestCase(10, 10)] | ||
[TestCase(16, 16)] | ||
[TestCase(32, 32)] | ||
[TestCase(64, 64)] | ||
[TestCase(128, 128)] | ||
[TestCase(256, 256)] | ||
[TestCase(512, 256)] | ||
public void Frames_GetBitmapFrame_Width(int width, int expected) | ||
{ | ||
var source = ResourceNameIcoFrames.GetBitmapSource().GetBitmapFrame(width); | ||
Assert.AreEqual(expected, source.Width); | ||
} | ||
} | ||
} |
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