/*******************************************************************************
 * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package org.eclipse.xtext.parser.unorderedGroups;

import java.io.ByteArrayOutputStream;

import org.eclipse.xtext.XtextStandaloneSetup;
import org.eclipse.xtext.junit4.AbstractXtextTests;
import org.eclipse.xtext.resource.XtextResource;
import org.junit.Test;

/**
 * @author Sebastian Zarnekow - Initial contribution and API
 */
public class GrammarSerializerTest extends AbstractXtextTests {

	@Override
	public void setUp() throws Exception {
		super.setUp();
		with(XtextStandaloneSetup.class);
	}
	
	@Test public void testSerializeGrammar() throws Exception {
		String string = readFileIntoString("org/eclipse/xtext/parser/unorderedGroups/UnorderedGroupsTestLanguage.xtext");
		XtextResource resource = getResourceFromString(string);
		resource.save(new ByteArrayOutputStream(), null);
	}

}

@@ -707,16 +707,85 @@
 source;%0A
+import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider;%0A
 import o
@@ -1278,16 +1278,121 @@
 tring);%0A
+%09%09resource.getResourceSet().getLoadOptions().put(ResourceDescriptionsProvider.LIVE_SCOPE, Boolean.TRUE);%0A
 %09%09resour

fix IdeaGrammarSerializerTest