Package org.qi4j.api.unitofwork

Examples of org.qi4j.api.unitofwork.UnitOfWork.discard()


            validateState( spi.stateOf( testEntity ), spi.entityDescriptorFor( testEntity ) );
            uow.complete();
        }
        finally
        {
            uow.discard();
        }
    }

    private void validateState( AssociationStateHolder state, EntityDescriptor entityDescriptor )
    {
View Full Code Here


                        someManyAssocDesc.hashCode(),
                        equalTo( some2ManyAssocDesc.hashCode() ) );
        }
        finally
        {
            uow.discard();
        }
    }

    @Test
    public void givenValuesOfTheSameTypeAndDifferentStateWhenTestingAssociationDescriptorEqualityExpectEquals()
View Full Code Here

                        someManyAssocDesc.hashCode(),
                        equalTo( some2ManyAssocDesc.hashCode() ) );
        }
        finally
        {
            uow.discard();
        }
    }

    @Test
    public void givenValuesOfDifferentTypeAndSameStateWhenTestingAssociationDescriptorEqualityExpectNotEquals()
View Full Code Here

                        someManyAssocDesc.hashCode(),
                        not( equalTo( some2ManyAssocDesc.hashCode() ) ) );
        }
        finally
        {
            uow.discard();
        }
    }

    //
    // --------------------------------:: Association State equality tests ::----------------------------------------------
View Full Code Here

                        some.manyEntities().toList().hashCode(),
                        not( equalTo( some2.manyEntities().toList().hashCode() ) ) );
        }
        finally
        {
            uow.discard();
        }
    }

    @Test
    public void givenValuesOfDifferentTypesAndSameStateWhenTestingAssociationStateEqualityExpectEquals()
View Full Code Here

                        some.manyEntities().toList().hashCode(),
                        equalTo( other.manyEntities().toList().hashCode() ) );
        }
        finally
        {
            uow.discard();
        }
    }

    //
    // ----------------------------------:: Association equality tests ::-----------------------------------------------
View Full Code Here

                        some.manyEntities().hashCode(),
                        equalTo( some2.manyEntities().hashCode() ) );
        }
        finally
        {
            uow.discard();
        }
    }

    @Test
    public void givenValuesOfTheSameTypeAndDifferentStateWhenTestingAssociationEqualityExpectNotEquals()
View Full Code Here

                        some.manyEntities().hashCode(),
                        not( equalTo( some2.manyEntities().hashCode() ) ) );
        }
        finally
        {
            uow.discard();
        }
    }

    @Test
    public void givenValuesOfDifferentTypesAndSameStateWhenTestingAssociationEqualityExpectNotEquals()
View Full Code Here

        {
            assertThat( "Default mixin has executed", foo.test( "Foo", 42 ), equalTo( "Foo 42" ) );
        }
        finally
        {
            uow.discard();
        }
    }

    public interface FooComposite
        extends TransientComposite
View Full Code Here

                        some.manyEntities().hashCode(),
                        not( equalTo( other.manyEntities().hashCode() ) ) );
        }
        finally
        {
            uow.discard();
        }
    }

    @Test
    public void givenValuesOfDifferentTypesAndDifferentStateWhenTestingAssociationEqualityExpectNotEquals()
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.