File tree Expand file tree Collapse file tree 2 files changed +24
-10
lines changed
src/test/java/com/google/datastore/snippets Expand file tree Collapse file tree 2 files changed +24
-10
lines changed Original file line number Diff line number Diff line change 1- <?xml version =" 1.0" encoding =" UTF-8" ?>
2- <project xmlns =" http://maven.apache.org/POM/4.0.0"
3- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4- xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
1+ <!--
2+ Copyright 2016 Google Inc. All Rights Reserved.
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+ -->
16+ <project >
517 <modelVersion >4.0.0</modelVersion >
618 <groupId >com.google.datastore.snippets</groupId >
719 <artifactId >datastore-snippets</artifactId >
2537 <artifactId >gcloud-java-datastore</artifactId >
2638 <version >0.2.8</version >
2739 </dependency >
40+
41+ <!-- Test dependencies -->
2842 <dependency >
2943 <groupId >junit</groupId >
3044 <artifactId >junit</artifactId >
3145 <version >4.12</version >
32- <!-- JUnit is used in the Concepts class, which is in the main not test
33- directory, so we must override test scope inherited from the parent
34- pom. -->
35- <scope >compile</scope >
46+ <scope >test</scope >
3647 </dependency >
3748 </dependencies >
3849 <build >
Original file line number Diff line number Diff line change 5757import org .junit .Rule ;
5858import org .junit .Test ;
5959import org .junit .rules .ExpectedException ;
60+ import org .junit .runner .RunWith ;
61+ import org .junit .runners .JUnit4 ;
6062
6163import java .io .IOException ;
6264import java .util .ArrayList ;
7476/**
7577 * Contains Cloud Datastore snippets demonstrating concepts for documentation.
7678 */
77- public class Concepts {
79+ @ RunWith (JUnit4 .class )
80+ public class ConceptsTest {
7881
7982 private static final LocalDatastoreHelper HELPER = LocalDatastoreHelper .create (1.0 );
8083 private static final FullEntity <IncompleteKey > TEST_FULL_ENTITY = FullEntity .builder ().build ();
@@ -989,7 +992,7 @@ public void testPropertyFilteringRunQuery() {
989992 }
990993 // [END property_filtering_run_query]
991994 Map <String , ImmutableSet <String >> expected =
992- ImmutableMap .of ("Task" , ImmutableSet .of ("priority" , "tag" , "category" ));
995+ ImmutableMap .of ("Task" , ImmutableSet .of ("priority" , "tag" ));
993996 assertEquals (expected , propertiesByKind );
994997 }
995998
You can’t perform that action at this time.
0 commit comments