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
| package org.springframework.test.context.junit4.spr16716; | |
| import org.junit.Assert; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; | |
| import org.junit.runners.model.Statement; | |
| import org.mockito.Mock; | |
| import org.mockito.junit.MockitoJUnitRunner; | |
| import org.springframework.core.NestedExceptionUtils; | |
| import org.springframework.test.context.junit4.statements.SpringFailOnTimeout; |
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
| Document document = DocumentBuilderFactory.newInstance().newInstance().newDocumentBuilder().parse(new File("pom.xml")); | |
| try(QueryProcessor proc = new QueryProcessor("declare variable $mydoc external; $mydoc//node()[text()='Igor Sukhorukov']", context)) { | |
| proc.bind("mydoc", document); | |
| // Execute the query | |
| Value result = proc.value(); | |
| // Print result as string. | |
| System.out.println(result); | |
| } |
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
| public static void main(String[] args) throws Exception{ | |
| CliClient cliClient = new CliClient(); | |
| Map<String, MethodCall> connect = cliClient.connect(UUID.randomUUID().toString(), "127.0.0.1", 60001, "org.springframework.boot.*"); | |
| Set<Map.Entry<String, MethodCall>> entries = connect.entrySet(); | |
| for(Map.Entry<String, MethodCall> entry : entries){ | |
| if(entry.getKey().endsWith("<init>") || | |
| entry.getKey().endsWith("<clinit>")) continue; | |
| String diagram = SdEditDataRenderer.getSequenceDiagram(entry.getValue()); | |
| if(diagram.split("\n").length>100){ | |
| System.out.println("diagram too large "+entry.getKey()); |
NewerOlder