This repository has been archived by the owner on Dec 23, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added te ability to set element border and opacity.
- Loading branch information
1 parent
e6df978
commit fdfba96
Showing
7 changed files
with
188 additions
and
19 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Structurizr | ||
{ | ||
public enum Border | ||
{ | ||
|
||
Solid, | ||
Dashed | ||
|
||
} | ||
} |
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,32 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace Structurizr.CoreTests | ||
{ | ||
[TestClass] | ||
public class ElementStyleTests | ||
{ | ||
|
||
[TestMethod] | ||
public void Test_Opacity() | ||
{ | ||
ElementStyle style = new ElementStyle(); | ||
Assert.IsNull(style.Opacity); | ||
|
||
style.Opacity = -1; | ||
Assert.AreEqual(0, style.Opacity); | ||
|
||
style.Opacity = 0; | ||
Assert.AreEqual(0, style.Opacity); | ||
|
||
style.Opacity = 50; | ||
Assert.AreEqual(50, style.Opacity); | ||
|
||
style.Opacity = 100; | ||
Assert.AreEqual(100, style.Opacity); | ||
|
||
style.Opacity = 101; | ||
Assert.AreEqual(100, style.Opacity); | ||
} | ||
|
||
} | ||
} |
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,53 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace Structurizr.CoreTests.View | ||
{ | ||
[TestClass] | ||
public class RelationshipStyleTests | ||
{ | ||
|
||
[TestMethod] | ||
public void Test_Position() | ||
{ | ||
RelationshipStyle style = new RelationshipStyle(); | ||
Assert.IsNull(style.Position); | ||
|
||
style.Position = -1; | ||
Assert.AreEqual(0, style.Position); | ||
|
||
style.Position = 0; | ||
Assert.AreEqual(0, style.Position); | ||
|
||
style.Position = 50; | ||
Assert.AreEqual(50, style.Position); | ||
|
||
style.Position = 100; | ||
Assert.AreEqual(100, style.Position); | ||
|
||
style.Position = 101; | ||
Assert.AreEqual(100, style.Position); | ||
} | ||
|
||
[TestMethod] | ||
public void Test_Opacity() | ||
{ | ||
RelationshipStyle style = new RelationshipStyle(); | ||
Assert.IsNull(style.Opacity); | ||
|
||
style.Opacity = -1; | ||
Assert.AreEqual(0, style.Opacity); | ||
|
||
style.Opacity = 0; | ||
Assert.AreEqual(0, style.Opacity); | ||
|
||
style.Opacity = 50; | ||
Assert.AreEqual(50, style.Opacity); | ||
|
||
style.Opacity = 100; | ||
Assert.AreEqual(100, style.Opacity); | ||
|
||
style.Opacity = 101; | ||
Assert.AreEqual(100, style.Opacity); | ||
} | ||
} | ||
} |