Examples of TestModel


Examples of com.totsp.gwittir.client.testmodel.TestModel

        return "com.totsp.gwittir.GwittirTest";
    }

   
    public void testToString() {
        TestModel testModel = new TestModel();
        System.out.println(testModel.toString());
    }
View Full Code Here

Examples of org.drools.decisiontable.model.TestModel

        RuleBase rb = DecisionTableLoader.loadFromInputStream( stream );
        assertNotNull( rb );

        WorkingMemory engine = rb.newWorkingMemory( );

        TestModel model = new TestModel( );
        model.setFireRule( true );
        assertFalse( model.isRuleFired( ) );
        engine.assertObject( model );
        engine.fireAllRules( );
        assertTrue( model.isRuleFired( ) );

    }
View Full Code Here

Examples of org.drools.decisiontable.model.TestModel

        RuleBase rb = DecisionTableLoader.loadFromInputStream( stream, InputType.CSV );
        assertNotNull( rb );

        WorkingMemory engine = rb.newWorkingMemory( );

        TestModel model = new TestModel( );
        model.setFireRule( true );
        assertFalse( model.isRuleFired( ) );
        engine.assertObject( model );
        engine.fireAllRules( );
        assertTrue( model.isRuleFired( ) );

    }   
View Full Code Here

Examples of org.openengsb.core.edbi.models.TestModel

        when(commit.getTimestamp()).thenReturn(new Date(42));
        // TODO: mock entire commit

        List models = new ArrayList<>();

        models.add(new TestModel("A", 42));
        models.add(new TestModel("B", -42));

        InsertOperation operation = new InsertOperation(commit, testIndex, models);

        engine.execute(operation);
View Full Code Here

Examples of org.openengsb.core.edbi.models.TestModel

        engine.create(testIndex);

        IndexCommit commit = mock(IndexCommit.class);
        when(commit.getTimestamp()).thenReturn(new Date(42));

        TestModel testModelA = new TestModel("A", 42);
        TestModel testModelB = new TestModel("B", -42);

        List<OpenEngSBModel> list = new ArrayList<>();

        list.add((OpenEngSBModel) testModelA);
        list.add((OpenEngSBModel) testModelB);

        engine.execute(new InsertOperation(commit, testIndex, list));

        testModelB.setTestInteger(43);

        IndexCommit updateCommit = mock(IndexCommit.class);
        when(updateCommit.getTimestamp()).thenReturn(new Date(84));
        engine.execute(new UpdateOperation(updateCommit, testIndex, new ArrayList(Arrays.asList(testModelB))));
View Full Code Here

Examples of org.openengsb.core.edbi.models.TestModel

        engine.create(testIndex);

        IndexCommit commit = mock(IndexCommit.class);
        when(commit.getTimestamp()).thenReturn(new Date(42));

        TestModel testModelA = new TestModel("A", 42);
        TestModel testModelB = new TestModel("B", -42);

        engine.execute(new InsertOperation(commit, testIndex, new ArrayList(Arrays.asList(testModelA, testModelB))));

        IndexCommit deleteCommit = mock(IndexCommit.class);
        when(deleteCommit.getTimestamp()).thenReturn(new Date(84));
View Full Code Here

Examples of org.openengsb.core.edbi.models.TestModel

        when(commit.getTimestamp()).thenReturn(new Date(42));
        // TODO: mock entire commit

        List models = new ArrayList<>();

        models.add(new TestModel("A", 42));
        models.add(new TestModel("B", -42));

        InsertOperation operation = new InsertOperation(commit, testIndex, models);

        engine.execute(operation);
View Full Code Here

Examples of org.openengsb.core.edbi.models.TestModel

        engine.create(testIndex);

        IndexCommit commit = mock(IndexCommit.class);
        when(commit.getTimestamp()).thenReturn(new Date(42));

        TestModel testModelA = new TestModel("A", 42);
        TestModel testModelB = new TestModel("B", -42);

        engine.execute(new InsertOperation(commit, testIndex, new ArrayList(Arrays.asList(testModelA, testModelB))));

        testModelB.setTestInteger(43);

        IndexCommit updateCommit = mock(IndexCommit.class);
        when(updateCommit.getTimestamp()).thenReturn(new Date(84));
        engine.execute(new UpdateOperation(updateCommit, testIndex,
            new ArrayList(Arrays.asList(testModelA, testModelB))));
View Full Code Here

Examples of org.openengsb.core.edbi.models.TestModel

        engine.create(testIndex);

        IndexCommit commit = mock(IndexCommit.class);
        when(commit.getTimestamp()).thenReturn(new Date(42));

        TestModel testModelA = new TestModel("A", 42);
        TestModel testModelB = new TestModel("B", -42);

        engine.execute(new InsertOperation(commit, testIndex, new ArrayList(Arrays.asList(testModelA, testModelB))));

        IndexCommit deleteCommit = mock(IndexCommit.class);
        when(deleteCommit.getTimestamp()).thenReturn(new Date(84));
View Full Code Here

Examples of org.openengsb.core.edbi.models.TestModel

    public void commit_createsIndexInherently() throws Exception {
        assertFalse(engine.indexExists(TestModel.class));
        assertEquals(0, jdbc().queryForInt("SELECT COUNT(*) FROM INDEX_INFORMATION"));

        IndexCommit commit = newTestCommit()
            .insert(new TestModel("foo", 1))
            .get();

        engine.commit(commit);

        assertEquals(1, jdbc().queryForInt("SELECT COUNT(*) FROM INDEX_INFORMATION"));
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.