Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void storeAndLoad_Big_CompositeMultiTokenSchemaRule() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void StoreAndLoadBigCompositeMultiTokenSchemaRule()
        {
            // GIVEN
            StoreIndexDescriptor indexRule = forSchema(multiToken(IntStream.range(1, 200).toArray(), EntityType.RELATIONSHIP, IntStream.range(1, 200).toArray()), PROVIDER_DESCRIPTOR).withId(_store.nextId());

            // WHEN
            StoreIndexDescriptor readIndexRule = ( StoreIndexDescriptor )SchemaRuleSerialization.deserialize(indexRule.Id, wrap(SchemaRuleSerialization.serialize(indexRule)));

            // THEN
            assertEquals(indexRule.Id, readIndexRule.Id);
            assertEquals(indexRule.Schema(), readIndexRule.Schema());
            assertEquals(indexRule, readIndexRule);
            assertEquals(indexRule.ProviderDescriptor(), readIndexRule.ProviderDescriptor());
        }
Beispiel #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void storeAndLoadSchemaRule() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void StoreAndLoadSchemaRule()
        {
            // GIVEN
            StoreIndexDescriptor indexRule = forSchema(forLabel(1, 4), PROVIDER_DESCRIPTOR).withId(_store.nextId());

            // WHEN
            StoreIndexDescriptor readIndexRule = ( StoreIndexDescriptor )SchemaRuleSerialization.deserialize(indexRule.Id, wrap(SchemaRuleSerialization.serialize(indexRule)));

            // THEN
            assertEquals(indexRule.Id, readIndexRule.Id);
            assertEquals(indexRule.Schema(), readIndexRule.Schema());
            assertEquals(indexRule, readIndexRule);
            assertEquals(indexRule.ProviderDescriptor(), readIndexRule.ProviderDescriptor());
        }
Beispiel #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void storeAndLoadCompositeSchemaRule() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void StoreAndLoadCompositeSchemaRule()
        {
            // GIVEN
            int[] propertyIds = new int[] { 4, 5, 6, 7 };
            StoreIndexDescriptor indexRule = forSchema(forLabel(2, propertyIds), PROVIDER_DESCRIPTOR).withId(_store.nextId());

            // WHEN
            StoreIndexDescriptor readIndexRule = ( StoreIndexDescriptor )SchemaRuleSerialization.deserialize(indexRule.Id, wrap(SchemaRuleSerialization.serialize(indexRule)));

            // THEN
            assertEquals(indexRule.Id, readIndexRule.Id);
            assertEquals(indexRule.Schema(), readIndexRule.Schema());
            assertEquals(indexRule, readIndexRule);
            assertEquals(indexRule.ProviderDescriptor(), readIndexRule.ProviderDescriptor());
        }
Beispiel #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void storeAndLoadAnyTokenMultiTokenSchemaRule() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void StoreAndLoadAnyTokenMultiTokenSchemaRule()
        {
            // GIVEN
            int[] propertyIds              = new int[] { 4, 5, 6, 7 };
            int[] entityTokens             = new int[] {};
            StoreIndexDescriptor indexRule = forSchema(multiToken(entityTokens, EntityType.NODE, propertyIds), PROVIDER_DESCRIPTOR).withId(_store.nextId());

            // WHEN
            StoreIndexDescriptor readIndexRule = ( StoreIndexDescriptor )SchemaRuleSerialization.deserialize(indexRule.Id, wrap(SchemaRuleSerialization.serialize(indexRule)));

            // THEN
            assertEquals(indexRule.Id, readIndexRule.Id);
            assertEquals(indexRule.Schema(), readIndexRule.Schema());
            assertEquals(indexRule, readIndexRule);
            assertEquals(indexRule.ProviderDescriptor(), readIndexRule.ProviderDescriptor());
        }
Beispiel #5
0
 private IndexProvider Provider(IndexProviderMap providers, StoreIndexDescriptor indexRule)
 {
     return(providers.Lookup(indexRule.ProviderDescriptor()));
 }