/** * generated by Xtext 2.23.0 */ package fr.n7.tests; import com.google.inject.Inject; import fr.n7.game.Jeu; import fr.n7.tests.GAMEInjectorProvider; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtend2.lib.StringConcatenation; import org.eclipse.xtext.testing.InjectWith; import org.eclipse.xtext.testing.extensions.InjectionExtension; import org.eclipse.xtext.testing.util.ParseHelper; import org.eclipse.xtext.xbase.lib.Exceptions; import org.eclipse.xtext.xbase.lib.IterableExtensions; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @ExtendWith(InjectionExtension.class) @InjectWith(GAMEInjectorProvider.class) @SuppressWarnings("all") public class GAMEParsingTest { @Inject private ParseHelper parseHelper; @Test public void loadModel() { try { StringConcatenation _builder = new StringConcatenation(); _builder.append("Hello Xtext!"); _builder.newLine(); final Jeu result = this.parseHelper.parse(_builder); Assertions.assertNotNull(result); final EList errors = result.eResource().getErrors(); boolean _isEmpty = errors.isEmpty(); StringConcatenation _builder_1 = new StringConcatenation(); _builder_1.append("Unexpected errors: "); String _join = IterableExtensions.join(errors, ", "); _builder_1.append(_join); Assertions.assertTrue(_isEmpty, _builder_1.toString()); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } } }