Skip to content

Instantly share code, notes, and snippets.

View amischler's full-sized avatar

Antoine Mischler amischler

View GitHub Profile
public class ModelMapperReMappingTest {
interface Configurable {
void configure();
}
static class B1 {
### Keybase proof
I hereby claim:
* I am amischler on github.
* I am amischler (https://keybase.io/amischler) on keybase.
* I have a public key ASB9e3ZoDlerjg4_FLqK2Kg9P7Ee58C4ES4j6r5XvMi2qAo
To claim this, I am signing this object:
package org.modeshape.jcr.index.local;
import org.mapdb.*;
import org.modeshape.common.collection.Problems;
import org.modeshape.jcr.ExecutionContext;
import org.modeshape.jcr.JcrI18n;
import org.modeshape.jcr.NodeTypes;
import org.modeshape.jcr.api.index.IndexDefinition;
import org.modeshape.jcr.api.query.qom.ChildCount;
import org.modeshape.jcr.api.query.qom.QueryObjectModelConstants;
<dependency>
<groupId>org.ow2.bundles</groupId>
<artifactId>ow2-bundles-externals-commons-collections</artifactId>
<version>1.0.36</version>
</dependency>
<dependency>
<groupId>org.wisdom-framework.jcr</groupId>
<artifactId>wisdom-jcr-core</artifactId>
<version>1.0-SNAPSHOT</version>
<exclusions>
@amischler
amischler / JcrReferenceMapTest
Created February 25, 2015 14:16
JcrReferenceMap Test
package org.jcrom.modeshape;
import org.jcrom.Jcrom;
import org.jcrom.annotations.JcrName;
import org.jcrom.annotations.JcrPath;
import org.jcrom.annotations.JcrReference;
import org.junit.Test;
import org.modeshape.test.ModeShapeSingleUseTest;
import javax.jcr.Node;
@amischler
amischler / BidirectionalBindingTest.java
Created February 12, 2015 10:02
BidirectionalBinding unit test
package com.sun.javafx.binding;
import javafx.beans.property.*;
import org.junit.Assert;
import org.junit.Test;
public class BidirectionalBindingTest {
@Test
@amischler
amischler / BidirectionalBinding.java
Last active October 14, 2021 14:54
RT-18486 Allow bidirectional binding with conversion between arbitrary properties
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
public class TestBigDecimalSerialization extends ModeShapeSingleUseTest {
public static class TestBean extends AbstractJcrEntity {
@JcrSerializedProperty
private BigDecimal bigDecimal;
public BigDecimal getBigDecimal() {
return bigDecimal;
}
@amischler
amischler / gist:3966cdc6410203011f08
Created January 8, 2015 16:10
TestUpdateChildNodePerformance
package org.jcrom.modeshape;
import org.jcrom.Jcrom;
import org.jcrom.entities.Child;
import org.jcrom.entities.Parent;
import org.junit.Test;
import org.modeshape.test.ModeShapeSingleUseTest;
/**
*/
import org.jcrom.util.NodeFilter;
import org.junit.Assert;
import org.junit.Test;
public class NodeFilterTest {
@Test
public void testNodeFilterDepth() {
NodeFilter nodeFilter = new NodeFilter("b", NodeFilter.DEPTH_INFINITE, 0);
Assert.assertEquals(true, nodeFilter.isIncluded("b", 0)); // OK