use of org.jnario.runner.Order in project applause by applause.
the class EntitiesDefiningEntitiesSpec method _entityAttributes.
/**
* Entities can have any number of attributes. Attribute types refer to `datatype`s or other
* `entity`s.
* @filter('''|.isValid.*)
*/
@Test
@Named("Entity attributes")
@Order(5)
public void _entityAttributes() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("datatype String");
_builder.newLine();
_builder.append("datatype Date");
_builder.newLine();
_builder.append("entity Person {");
_builder.newLine();
_builder.append("\t");
_builder.append("String name");
_builder.newLine();
_builder.append("\t");
_builder.append("Date birthdate");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this._entitiesValidationTestHelper.isValidEntityWithAttributes(_builder);
}
use of org.jnario.runner.Order in project applause by applause.
the class RESTURLsAbsoluteRESTURLsSpec method _simpleAbsoluteRESTURLSWithPort.
/**
* An absolute REST URL can contain a port.
* @filter('''|.baseUrlShouldBe.*)
*/
@Test
@Named("Simple absolute REST URLS with port")
@Order(2)
public void _simpleAbsoluteRESTURLSWithPort() 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://localhost:2403/persons");
_builder.newLine();
_builder.append("\t");
_builder.append("resource: Person");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this.baseUrlShouldBe(_builder, "http://localhost:2403/persons");
}
use of org.jnario.runner.Order in project applause by applause.
the class RESTURLsAbsoluteRESTURLsSpec method _simpleAbsoluteRESTURLS.
/**
* Absolute REST URLs start with `http://`, continue with a hostname, and end with a resource path
* @filter('''|.baseUrlShouldBe.*)
*/
@Test
@Named("Simple absolute REST URLS")
@Order(1)
public void _simpleAbsoluteRESTURLS() 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://localhost/persons");
_builder.newLine();
_builder.append("\t");
_builder.append("resource: Person");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this.baseUrlShouldBe(_builder, "http://localhost/persons");
}
use of org.jnario.runner.Order in project applause by applause.
the class RESTURLsRelativeRESTURLsSpec method _simpleRelativeRESTURL.
/**
* Relative REST URLs start with `/`, and continue with a resource path
* @filter('''|.dataSourceAccessMethodUrlShouldBe.*)
*/
@Test
@Named("Simple relative REST URL")
@Order(1)
public void _simpleRelativeRESTURL() 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://localhost/persons");
_builder.newLine();
_builder.append("\t");
_builder.append("resource: Person");
_builder.newLine();
_builder.append("\t");
_builder.append("post(Person person) GET /persons");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this.dataSourceAccessMethodUrlShouldBe(_builder, "/persons");
}
use of org.jnario.runner.Order in project applause by applause.
the class RESTURLsRelativeRESTURLsSpec method _moreComplexRelativeRESTURL.
/**
* Relative REST URLs start with `/`, and continue with a resource path
* @filter('''|.dataSourceAccessMethodUrlShouldBe.*)
*/
@Test
@Named("More complex relative REST URL")
@Order(2)
public void _moreComplexRelativeRESTURL() 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://localhost/persons");
_builder.newLine();
_builder.append("\t");
_builder.append("resource: Person");
_builder.newLine();
_builder.append("\t");
_builder.append("post(Person person) GET /boo/bar/baz/persons");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this.dataSourceAccessMethodUrlShouldBe(_builder, "/boo/bar/baz/persons");
}
Aggregations