use of org.jnario.runner.Named in project applause by applause.
the class EntitiesDefiningEntitiesSpec method _propertyCardinality.
/**
* Properties can have an optional cardinality, so you can express 1:n relationships.
* @filter('''|.isValid.*)
*/
@Test
@Named("Property cardinality")
@Order(6)
public void _propertyCardinality() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("entity Person {");
_builder.newLine();
_builder.append("\t");
_builder.append("Person[] friends");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this._entitiesValidationTestHelper.isValidEntityWithOneToManyRelationship(_builder);
}
use of org.jnario.runner.Named in project applause by applause.
the class EntitiesDefiningEntitiesSpec method _entitiesMustBeUnique.
/**
* Entities must be unique. Currently, this means they must be unique across the board and __cannot__
* be namespaced.
* @filter('''|.hasDuplicateDatatype)
*/
@Test
@Named("Entities must be unique")
@Order(2)
public void _entitiesMustBeUnique() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("entity Person");
_builder.newLine();
_builder.append("entity Person // <-- invalid");
_builder.newLine();
this._entitiesValidationTestHelper.hasDuplicateEntity(_builder);
}
use of org.jnario.runner.Named in project applause by applause.
the class RESTURLsAbsoluteRESTURLsSpec method _absoluteRESTURLWithFullDomainNamePortAndDeepPath.
/**
* An absolute REST URL can have a full domain name, a port and a deep path.
* @filter('''|.baseUrlShouldBe.*)
*/
@Test
@Named("Absolute REST URL with full domain name, port and deep path")
@Order(3)
public void _absoluteRESTURLWithFullDomainNamePortAndDeepPath() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("entity Person {}");
_builder.newLine();
_builder.append("datasource PersonDataSource {");
_builder.newLine();
_builder.append("\t");
_builder.append("baseUrl: http://www.foobar.com:2403/foo/bar/baz");
_builder.newLine();
_builder.append("\t");
_builder.append("resource: Person");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this.baseUrlShouldBe(_builder, "http://www.foobar.com:2403/foo/bar/baz");
}
use of org.jnario.runner.Named in project applause by applause.
the class ScalarDataTypesDefiningDataTypesSpec method _simpleDataTypes.
/**
* New data types can be defined using the `datatype` keyword.
* @filter('''|.isValid)
*/
@Test
@Named("Simple data types")
@Order(1)
public void _simpleDataTypes() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("datatype String");
_builder.newLine();
_builder.append("datatype Integer");
_builder.newLine();
this._applauseValidationTestHelper.isValid(_builder);
}
use of org.jnario.runner.Named in project applause by applause.
the class ScreensDefiningScreensSpec method _screensCanHaveAnOptionalTitle.
/**
* Screens can have an optional title, which will be displayed in the title area of a screen.
* @filter('''|.hasTitle.*)
*/
@Test
@Named("Screens can have an optional title")
@Order(3)
public void _screensCanHaveAnOptionalTitle() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("screen DefaultList PersonList {");
_builder.newLine();
_builder.append("\t");
_builder.append("title = \"Persons\"");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this._screensValidationTestHelper.hasTitle(_builder, "Person");
}
Aggregations