-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
18 changed files
with
420 additions
and
126 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
16 changes: 16 additions & 0 deletions
16
test/PlantUmlClassDiagramGeneratorTest/testData/plantuml/AtPrefixType.puml
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,16 @@ | ||
@startuml | ||
class "@ClassA" { | ||
} | ||
class "@Type1" { | ||
} | ||
class "@Type2" { | ||
} | ||
class "@IList`1"<T> { | ||
} | ||
"@ClassA" o-> "@Strings<@string>" "@IList`1" | ||
"@ClassA" --> "@Prop1" "@Type1" | ||
"@ClassA" --> "@field1" "@Type2" | ||
"@Type1" --> "@value1" "@int" | ||
"@Type2" --> "@string1" "@string" | ||
"@Type2" --> "@Prop2" "@ExternalType" | ||
@enduml |
48 changes: 48 additions & 0 deletions
48
test/PlantUmlClassDiagramGeneratorTest/testData/plantuml/AttributeRequierd.puml
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,48 @@ | ||
@startuml | ||
class ClassA { | ||
} | ||
class ClassB { | ||
} | ||
interface IInterfaceA { | ||
Num2 : double <<get>> | ||
} | ||
interface IInterfaceB { | ||
Num2 : double <<get>> | ||
} | ||
class RecordA <<record>> { | ||
+ Prop1 : string <<get>> | ||
+ Prop2 : string <<get>> | ||
+ RecordA(prop1:string, prop2:string) | ||
} | ||
class RecordB <<record>> { | ||
+ Prop1 : string <<get>> | ||
+ Prop2 : string <<get>> | ||
+ RecordB(prop1:string, prop2:string) | ||
} | ||
class StructA <<struct>> { | ||
+ StructA(field1:RecordA) | ||
} | ||
class StructB <<struct>> { | ||
+ StructB(field1:RecordB) | ||
} | ||
class RecordStructA <<record>> <<struct>> { | ||
+ X : int <<get>> <<init>> | ||
+ Y : int <<get>> <<init>> | ||
} | ||
class RecordStructB <<record>> <<struct>> { | ||
+ X : int <<get>> <<init>> | ||
+ Y : int <<get>> <<init>> | ||
} | ||
enum EnumA { | ||
A, | ||
B, | ||
C, | ||
} | ||
enum EnumB { | ||
A, | ||
B, | ||
C, | ||
} | ||
StructA --> RecordA : "use" | ||
StructB --> RecordB : "use" | ||
@enduml |
30 changes: 30 additions & 0 deletions
30
test/PlantUmlClassDiagramGeneratorTest/testData/plantuml/Attributes.puml
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 @@ | ||
@startuml | ||
class Parameters { | ||
+ A : string <<get>> <<set>> | ||
+ B : string <<get>> <<set>> | ||
} | ||
class MyClass { | ||
+ ReadOnlyItems : IReadOnlyCollection<Item> <<get>> | ||
+ Run(p:Parameters) : void | ||
+ MyClass(logger:ILogger) | ||
} | ||
class MyStruct <<struct>> { | ||
+ MyStruct(p:Parameters) | ||
} | ||
class MyRecord <<record>> { | ||
+ name : string <<get>> <<init>> | ||
} | ||
class MyStructRecord <<record>> <<struct>> { | ||
} | ||
class ClassA { | ||
+ ClassA(logger:ILogger) | ||
} | ||
MyClass o-- "0..*" Item : "Items" | ||
MyClass "1" *-- "0..*" IItem : "ItemDictionary" | ||
MyClass ..> Parameters : "use" | ||
MyClass ..> ILogger : "Injection" | ||
MyStruct o-- "0..*" int : "intCollection:List<int>" | ||
MyRecord o-- Settings | ||
MyStructRecord o-- "Name" string | ||
ClassA --> "ILogger<ClassA>" : ""\escape "" | ||
@enduml |
20 changes: 20 additions & 0 deletions
20
test/PlantUmlClassDiagramGeneratorTest/testData/plantuml/CurlyBrackets.puml
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,20 @@ | ||
@startuml | ||
class CurlyBrackets { | ||
+ openingBracket : string = @" | ||
{ | ||
" | ||
+ openingBrackets : string = @" | ||
{{ | ||
" | ||
+ closingBracket : string = @" | ||
} | ||
" | ||
+ closingBrackets : string = @" | ||
}} | ||
" | ||
+ bothBrackets : string = @" | ||
{{ | ||
}} | ||
" | ||
} | ||
@enduml |
12 changes: 12 additions & 0 deletions
12
test/PlantUmlClassDiagramGeneratorTest/testData/plantuml/DefaultModifierType.puml
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,12 @@ | ||
@startuml | ||
class ClassA { | ||
- PropA : int <<get>> | ||
+ PropB : int <<get>> | ||
- MethodA() : void | ||
} | ||
class StructA <<struct>> { | ||
- PropA : string <<get>> | ||
{static} - PropB : string <<get>> | ||
{static} - MethodA() : void | ||
} | ||
@enduml |
32 changes: 32 additions & 0 deletions
32
test/PlantUmlClassDiagramGeneratorTest/testData/plantuml/GenericsType.puml
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 @@ | ||
@startuml | ||
class GenericsType { | ||
+ Value : object <<get>> | ||
} | ||
class "GenericsType`1"<T> { | ||
+ Value : T <<get>> | ||
} | ||
class "GenericsType`2"<T1,T2> { | ||
+ Value1 : T1 <<get>> | ||
+ Value2 : T2 | ||
} | ||
class SubClass { | ||
+ Value1 : string <<get>> | ||
+ Value2 : int | ||
} | ||
class "SubClass`1"<T> { | ||
+ Value2 : T <<get>> | ||
} | ||
class SubClassX { | ||
} | ||
class "BaseClass`1"<Tx> { | ||
+ X : Tx <<get>> <<set>> | ||
} | ||
class GenericsType <<partial>> { | ||
+ Number : int <<get>> <<set>> | ||
} | ||
"GenericsType`2" "<string,int>" <|-- SubClass | ||
"GenericsType`2" "<GenericsType<int>,T>" <|-- "SubClass`1" | ||
"SubClass`1" --> "Value1<int>" "GenericsType`1" | ||
"BaseClass`1" "<int>" <|-- SubClassX | ||
SubClassX --> "Gt" GenericsType | ||
@enduml |
54 changes: 54 additions & 0 deletions
54
test/PlantUmlClassDiagramGeneratorTest/testData/plantuml/InputClasses.puml
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,54 @@ | ||
@startuml | ||
class ClassA { | ||
+ PropD : string <<get>> | ||
+ ClassA() | ||
{static} ClassA() | ||
+ <<override>> ToString() : string | ||
+ {static} StaticMethod() : string | ||
+ ExpressonBodiedMethod(x:int) : void | ||
} | ||
abstract class ClassB { | ||
+ {abstract} PropA : int <<get>> <<protected set>> | ||
+ {abstract} AbstractMethod(arg1:int, arg2:double) : string | ||
} | ||
class ClassC <<sealed>> { | ||
+ <<override>> PropA : int <<get>> <<protected set>> = 100 | ||
+ <<event>> PropertyChanged : PropertyChangedEventHandler | ||
+ <<override>> AbstractMethod(arg1:int, arg2:double) : string | ||
} | ||
class Vector <<struct>> { | ||
+ X : double <<get>> | ||
+ Y : double <<get>> | ||
+ Z : double <<get>> | ||
+ Vector(x:double, y:double, z:double) | ||
+ Vector(source:Vector) | ||
} | ||
enum EnumA { | ||
AA= 0x0001, | ||
BB= 0x0002, | ||
CC= 0x0004, | ||
DD= 0x0008, | ||
EE= 0x0010, | ||
} | ||
class NestedClass { | ||
+ A : int <<get>> | ||
} | ||
class "IList`1"<T> { | ||
} | ||
class InnerClass { | ||
+ X : string <<get>> = "xx" | ||
+ MethodX() : void | ||
} | ||
class InnerStruct <<struct>> { | ||
+ A : int <<get>> | ||
+ InnerStruct(a:int) | ||
} | ||
ClassB --> "publicA" ClassA | ||
ClassB o-> "listOfA<ClassA>" "IList`1" | ||
ClassB <|-- ClassC | ||
INotifyPropertyChanged <|-- ClassC | ||
ClassC --> "PropB" ClassB | ||
NestedClass --> "B" InnerClass | ||
NestedClass +-- InnerClass | ||
InnerClass +-- InnerStruct | ||
@enduml |
5 changes: 5 additions & 0 deletions
5
test/PlantUmlClassDiagramGeneratorTest/testData/plantuml/NullableType.puml
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,5 @@ | ||
@startuml | ||
class NullableType1 { | ||
+ NullableLong : long? | ||
} | ||
@enduml |
31 changes: 31 additions & 0 deletions
31
test/PlantUmlClassDiagramGeneratorTest/testData/plantuml/RecordType.puml
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,31 @@ | ||
@startuml | ||
class MyRecord <<record>> { | ||
+ A : string <<get>> | ||
+ B : int <<get>> | ||
+ MyRecord(a:string, b:int) | ||
} | ||
class MyStructRecord <<record>> <<struct>> { | ||
+ A : string <<get>> <<init>> | ||
+ B : int <<get>> <<init>> | ||
} | ||
class MyRecord2 <<record>> { | ||
+ A : string <<get>> <<init>> | ||
+ B : int <<get>> <<init>> | ||
} | ||
class MyStructRecord2 <<record>> <<struct>> { | ||
+ A : string <<get>> <<init>> | ||
+ B : int <<get>> <<init>> | ||
} | ||
class "MyGenericRecord`2"<T1,T2> <<record>> { | ||
+ Type1 : T1 <<get>> <<init>> | ||
+ Type2 : T2 <<get>> <<init>> | ||
} | ||
class "MyGenericStructRecord`2"<T1,T2> <<record>> <<struct>> { | ||
+ Type1 : T1 <<get>> | ||
+ Type2 : T2 <<get>> | ||
+ MyGenericStructRecord(type1:T1, type2:T2) | ||
} | ||
class MyRecord3 <<record>> { | ||
} | ||
MyRecord3 --> "p1<long,bool>" "MyGenericRecord`2" | ||
@enduml |
11 changes: 11 additions & 0 deletions
11
test/PlantUmlClassDiagramGeneratorTest/testData/plantuml/include.puml
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,11 @@ | ||
@startuml | ||
!include .\\AtPrefixType.puml | ||
!include .\\AttributeRequierd.puml | ||
!include .\\Attributes.puml | ||
!include .\\CurlyBrackets.puml | ||
!include .\\DefaultModifierType.puml | ||
!include .\\GenericsType.puml | ||
!include .\\InputClasses.puml | ||
!include .\\NullableType.puml | ||
!include .\\RecordType.puml | ||
@enduml |
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
Oops, something went wrong.