1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-24 13:57:33 +00:00

Add test for aliases

This commit is contained in:
Benjamin Davies 2024-03-20 16:57:41 +13:00
parent cbe84c240a
commit d39bfbc3b5
No known key found for this signature in database
GPG Key ID: 9FFDE0674336C460
2 changed files with 1171 additions and 0 deletions

View File

@ -0,0 +1,94 @@
package nonreg.simple;
import java.io.IOException;
import org.junit.jupiter.api.Test;
import nonreg.BasicTest;
/*
Test diagram MUST be put between triple quotes
"""
@startchen movies
entity "Director" as DIRECTOR {
"No." as Number <<key>>
Name {
Fname
Lname
}
Born : DATE
Died
Age
}
entity "Customer" as CUSTOMER {
Number <<key>>
Bonus <<derived>>
Name <<multi>>
}
entity "Movie" as MOVIE {
Code
}
relationship "was-rented-to" as RENTED_TO {
Date
}
RENTED_TO -1- CUSTOMER
RENTED_TO -N- MOVIE
RENTED_TO -(N,M)- DIRECTOR
entity "Parent" as PARENT {
}
entity "Member" as MEMBER {
}
CUSTOMER ->- PARENT
MEMBER -<- CUSTOMER
entity "Kid" as CHILD <<weak>> {
Name <<key>>
}
relationship "is-parent-of" as PARENT_OF <<identifying>> {
}
PARENT_OF -1- PARENT
PARENT_OF =N= CHILD
entity "Little Kid" as TODDLER {
FavoriteToy
}
entity "Primary-Aged Kid" as PRIMARY_AGE {
FavoriteColor
}
entity "Teenager" as TEEN {
Hobby
}
CHILD =>= d { TODDLER, PRIMARY_AGE, TEEN }
entity "Human" as PERSON {
}
PERSON ->- U { CUSTOMER, DIRECTOR }
@endchen
"""
*/
public class ChenMovieAlias_Test extends BasicTest {
@Test
void testSimple() throws IOException {
checkImage("(30 entities)");
}
}

File diff suppressed because it is too large Load Diff