Created
March 5, 2012 12:01
-
-
Save Rikkola/1978060 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void testMatryoshkaDollSituation() throws Exception { | |
| TypeResolver typeResolver = new ClassTypeResolver(new HashSet<String>(), | |
| Thread.currentThread().getContextClassLoader()); | |
| typeResolver.addImport("org.drools.ide.common.server.testscenarios.MatryoshkaDoll"); | |
| MatryoshkaDoll matryoshkaDoll = new MatryoshkaDoll(); | |
| FactAssignmentField factAssignmentField = createFactAssigmentField(); | |
| createFactAssigmentField(factAssignmentField, 5); | |
| FactAssignmentFieldPopulator factAssignmentFieldPopulator = new FactAssignmentFieldPopulator(matryoshkaDoll, factAssignmentField, typeResolver); | |
| factAssignmentFieldPopulator.populate(new HashMap<String, Object>()); | |
| assertNotNull(matryoshkaDoll.getMatryoshkaDoll()); | |
| assertNotNull(matryoshkaDoll.getMatryoshkaDoll().getMatryoshkaDoll()); | |
| assertNotNull(matryoshkaDoll.getMatryoshkaDoll().getMatryoshkaDoll().getMatryoshkaDoll()); | |
| assertNotNull(matryoshkaDoll.getMatryoshkaDoll().getMatryoshkaDoll().getMatryoshkaDoll().getMatryoshkaDoll()); | |
| assertNotNull(matryoshkaDoll.getMatryoshkaDoll().getMatryoshkaDoll().getMatryoshkaDoll().getMatryoshkaDoll().getMatryoshkaDoll()); | |
| assertNotNull(matryoshkaDoll.getMatryoshkaDoll().getMatryoshkaDoll().getMatryoshkaDoll().getMatryoshkaDoll().getMatryoshkaDoll().getMatryoshkaDoll()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment