Search in sources :

Example 1 with AbsoluteRESTURL

use of org.applause.lang.applauseDsl.AbsoluteRESTURL in project applause by applause.

the class DataSourceImpl method basicSetBaseUrl.

/**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
public NotificationChain basicSetBaseUrl(AbsoluteRESTURL newBaseUrl, NotificationChain msgs) {
    AbsoluteRESTURL oldBaseUrl = baseUrl;
    baseUrl = newBaseUrl;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.DATA_SOURCE__BASE_URL, oldBaseUrl, newBaseUrl);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) AbsoluteRESTURL(org.applause.lang.applauseDsl.AbsoluteRESTURL)

Example 2 with AbsoluteRESTURL

use of org.applause.lang.applauseDsl.AbsoluteRESTURL in project applause by applause.

the class RESTURLsAbsoluteRESTURLsSpec method baseUrlShouldBe.

public void baseUrlShouldBe(final CharSequence sequence, final String url) {
    try {
        final Model model = this._parseHelper.parse(sequence);
        EList<NamedElement> _elements = model.getElements();
        Iterable<DataSource> _filter = Iterables.<DataSource>filter(_elements, DataSource.class);
        final DataSource datasource = IterableExtensions.<DataSource>head(_filter);
        final AbsoluteRESTURL baseUrl = datasource.getBaseUrl();
        String _value = this._rESTURLExtensions.value(baseUrl);
        Matcher<String> _is = CoreMatchers.<String>is(url);
        Assert.<String>assertThat(_value, _is);
    } catch (Throwable _e) {
        throw Exceptions.sneakyThrow(_e);
    }
}
Also used : Model(org.applause.lang.applauseDsl.Model) NamedElement(org.applause.lang.applauseDsl.NamedElement) DataSource(org.applause.lang.applauseDsl.DataSource) AbsoluteRESTURL(org.applause.lang.applauseDsl.AbsoluteRESTURL)

Aggregations

AbsoluteRESTURL (org.applause.lang.applauseDsl.AbsoluteRESTURL)2 DataSource (org.applause.lang.applauseDsl.DataSource)1 Model (org.applause.lang.applauseDsl.Model)1 NamedElement (org.applause.lang.applauseDsl.NamedElement)1 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1