Skip to content

Commit

Permalink
Repaired tests that didn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
labra committed Apr 22, 2018
1 parent 60adf45 commit a98b12c
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package es.weso.shex.converter.uml

import es.weso.shex.Schema
import es.weso.rdf.nodes.IRI
import es.weso.shex.{IRILabel, Schema}
import es.weso.shex.converter.ShEx2UML
import es.weso.uml.UMLDiagram._
import org.scalatest.{FunSpec, Matchers}
Expand All @@ -12,10 +13,10 @@ class ShExUMLTest extends FunSpec with Matchers {
val field1 = UMLField("xsd:name", Some("http://schema.org/name"), List(ValueConstraint("xsd:string",Some("http;//xmlschema.org/string"))), Range(1,Unbounded))
val field2 = UMLField("xsd:age", Some("http://schema.org/age"), List(ValueConstraint("xsd:int",Some("http;//xmlschema.org/int"))), Range(1,IntMax(1)))
val field3 = UMLField("xsd:homePage", Some("http://schema.org/homePage"), List(ValueConstraint("IRI",None)), Range(1,IntMax(1)))
val cls1 = UMLClass("C1", ":User", Some("http://schema.org/User"), List(List(field1, field2)))
val cls2 = UMLClass("C2", ":Company", Some("http://schema.org/User"), List(List(field3)))
val link1 = UMLLink(cls1,cls2,"schema:worksFor","http://schema.org", Star)
val uml = UML(Map("C1" -> cls1, "C2" -> cls2), List(link1))
val cls1 = UMLClass(1, ":User", Some("http://schema.org/User"), List(List(field1, field2)))
val cls2 = UMLClass(2, ":Company", Some("http://schema.org/User"), List(List(field3)))
val link1 = UMLLink(1,2,"schema:worksFor","http://schema.org", Star)
val uml = UML(Map(IRILabel(IRI("L1")) -> 1, IRILabel(IRI("L2")) -> 2), Map(1 -> cls1, 2 -> cls2), List(link1))
uml.classes.size should be(2)
uml.links.length should be(1)
// println(uml.toPlantUML)
Expand Down

0 comments on commit a98b12c

Please sign in to comment.