<commit_before>/*
 * Copyright (c) 2011 Google Inc.
 *
 * 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 com.google.eclipse.protobuf.scoping;

import static com.google.eclipse.protobuf.junit.matchers.PropertyHasType.hasType;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertThat;

import java.util.*;

import org.junit.*;

import com.google.eclipse.protobuf.junit.core.XtextRule;
import com.google.eclipse.protobuf.protobuf.Property;

/**
 * Tests for <code>{@link ProtoDescriptor#fileOptions()}</code>.
 *
 * @author <EMAIL> (<NAME>)
 */
public class Descriptor_fileOptions_Test {

  @Rule public XtextRule xtext = new XtextRule();

  private ProtoDescriptor descriptor;

  @Before public void setUp() {
    descriptor = xtext.getInstanceOf(ProtoDescriptorProvider.class).get();
  }

  @Test public void should_return_all_file_options() {
    Map<String, Property> fileOptions = mapByName(descriptor.fileOptions());
    assertThat(fileOptions.get("java_package"), hasType("string"));
    assertThat(fileOptions.get("java_outer_classname"), hasType("string"));
    assertThat(fileOptions.get("java_multiple_files"), hasType("bool"));<commit_msg>Ignoring tests that require to be executed as "JUnit Plug-in Test."<commit_after>/*
 * Copyright (c) 2011 Google Inc.
 *
 * 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 com.google.eclipse.protobuf.scoping;

import static com.google.eclipse.protobuf.junit.matchers.PropertyHasType.hasType;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertThat;

import java.util.*;

import org.junit.*;

import com.google.eclipse.protobuf.junit.core.XtextRule;
import com.google.eclipse.protobuf.protobuf.Property;

/**
 * Tests for <code>{@link ProtoDescriptor#fileOptions()}</code>.
 *
 * @author <EMAIL> (<NAME>)
 */
@Ignore("This test requires to be executed as a 'JUnit plug-in test'. I haven't found a way to register PlatformURLHandler with the JVM")
public class Descriptor_fileOptions_Test {

  @Rule public XtextRule xtext = new XtextRule();

  private ProtoDescriptor descriptor;

  @Before public void setUp() {
    descriptor = xtext.getInstanceOf(ProtoDescriptorProvider.class).get();
  }

  @Test public void should_return_all_file_options() {
    Map<String, Property> fileOptions = mapByName(descriptor.fileOptions());
    assertThat(fileOptions.get("java_package"), hasType("string"));
    assertThat(fileOptions.get("java_outer_classname"), hasType("string"));
    assertThat(fileOptions.get("java_multiple_files"), hasType("bool"));
{'fraction_non_alphanumeric': 0.12045760430686406, 'fraction_numerical': 0.005383580080753701, 'mean_word_length': 5.258947368421053, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2021717', 'n_tokens_mistral': 863, 'n_tokens_neox': 846, 'n_words': 219}