Skip to content

A Java fluent API for creating PlantUML diagrams (Currently only Activity diagram supported).

Notifications You must be signed in to change notification settings

makasprzak/plantuml-dsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

plantuml-dsl

A Java fluent api for creating PlantUML diagrams (Currently only Activity diagram supported). Provides an easy to use builder for defining the diagrams. Example usage:

    @Test
    public void shouldCreateBasicActivityGraphWithStartEndAndOneActivity() throws Exception {
        assertThat(
                activityGraph()
                        .start()
                        .activity("Some Activity")
                        .end()
                        .build()
        ).isEqualTo(read("/basicActivityGraphWithStartEndAndOneActivity.plantuml"));

    }

    @Test
    public void shouldCreateActivityGraphWithJoin() throws Exception {
        assertThat(
                activityGraph()
                        .activity("Source 1")
                        .activity("Some activity")
                        .end()
                .beginAnother()
                        .activity("Source 2")
                        .activity("Some other activity")
                        .end()
                .build()
        ).isEqualTo(read("/activityGraphWithJoin.plantuml"));

    }

    @Test
    public void shouldCreateActivityGraphWithCondition() throws Exception {
        assertThat(
                activityGraph()
                        .start()
                        .condition("A Condition")
                            .whenTrue()
                                .activity("When true action")
                            .whenFalse()
                                .activity("When false action")
                        .endIf()
                        .beginAnother()
                            .activity("When true action").end()
                        .beginAnother()
                            .activity("When false action").end()
                .build()
        ).isEqualTo(read("/activityGraphWithCondition.plantuml"));

    }

About

A Java fluent API for creating PlantUML diagrams (Currently only Activity diagram supported).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages