Codota Logo
PrototypesProvider
Code IndexAdd Codota to your IDE (free)

How to use
PrototypesProvider
in
rocks.inspectit.agent.java.spring

Best Java code snippets using rocks.inspectit.agent.java.spring.PrototypesProvider (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: inspectIT/inspectIT

@BeforeMethod
public void setup() {
  doReturn(new File(TEST_CACHE_FILE)).when(fileResolver).getClassHashCacheFile();
  when(prototypesProvider.createSerializer()).thenReturn(serializationManager);
}
origin: inspectIT/inspectIT

@Test
public void cacheFileExists() throws Exception {
  when(configurationStorage.isClassCacheExistsOnCmr()).thenReturn(true);
  new File(TEST_CACHE_FILE).createNewFile();
  Object javaRuntimeVersion = UnderlyingSystemInfo.JAVA_RUNTIME_VERSION;
  Object hashes = Collections.singletonMap("fqn", Collections.singleton("hash"));
  when(serializationManager.deserialize(Matchers.<Input> any())).thenReturn(javaRuntimeVersion).thenReturn(hashes);
  helper.afterPropertiesSet();
  verify(prototypesProvider, times(1)).createSerializer();
  verify(serializationManager, times(2)).deserialize(Matchers.<Input> any());
  verify(executorService, times(1)).scheduleAtFixedRate(Matchers.<Runnable> any(), anyLong(), anyLong(), Matchers.<TimeUnit> any());
  assertThat(helper.isEmpty(), is(false));
}
origin: inspectIT/inspectIT

@Test
public void cacheFileExistsException() throws Exception {
  when(configurationStorage.isClassCacheExistsOnCmr()).thenReturn(true);
  new File(TEST_CACHE_FILE).createNewFile();
  when(serializationManager.deserialize(Matchers.<Input> any())).thenThrow(new SerializationException());
  helper.afterPropertiesSet();
  verify(prototypesProvider, times(1)).createSerializer();
  verify(executorService, times(1)).scheduleAtFixedRate(Matchers.<Runnable> any(), anyLong(), anyLong(), Matchers.<TimeUnit> any());
  assertThat(helper.isEmpty(), is(true));
}
origin: inspectIT/inspectIT

@Test
public void noCacheFileExists() throws Exception {
  when(configurationStorage.isClassCacheExistsOnCmr()).thenReturn(true);
  helper.afterPropertiesSet();
  verify(prototypesProvider, times(1)).createSerializer();
  verify(executorService, times(1)).scheduleAtFixedRate(Matchers.<Runnable> any(), anyLong(), anyLong(), Matchers.<TimeUnit> any());
  verifyZeroInteractions(serializationManager);
  assertThat(helper.isEmpty(), is(true));
}
origin: inspectIT/inspectIT

@Test
public void cacheFileExistsJavaCached() throws Exception {
  when(configurationStorage.isClassCacheExistsOnCmr()).thenReturn(true);
  new File(TEST_CACHE_FILE).createNewFile();
  Object javaRuntimeVersion = UnderlyingSystemInfo.JAVA_RUNTIME_VERSION;
  Object hashes = Collections.singletonMap("java.lang.String", Collections.singleton("hash"));
  when(serializationManager.deserialize(Matchers.<Input> any())).thenReturn(javaRuntimeVersion).thenReturn(hashes);
  helper.afterPropertiesSet();
  verify(prototypesProvider, times(1)).createSerializer();
  verify(serializationManager, times(2)).deserialize(Matchers.<Input> any());
  verify(executorService, times(1)).scheduleAtFixedRate(Matchers.<Runnable> any(), anyLong(), anyLong(), Matchers.<TimeUnit> any());
  assertThat(helper.isEmpty(), is(false));
}
origin: inspectIT/inspectIT

@Test
public void cacheFileExistsJavaNotCached() throws Exception {
  when(configurationStorage.isClassCacheExistsOnCmr()).thenReturn(true);
  new File(TEST_CACHE_FILE).createNewFile();
  Object javaRuntimeVersion = "some_other_version";
  Object hashes = Collections.singletonMap("java.lang.String", Collections.singleton("hash"));
  when(serializationManager.deserialize(Matchers.<Input> any())).thenReturn(javaRuntimeVersion).thenReturn(hashes);
  helper.afterPropertiesSet();
  verify(prototypesProvider, times(1)).createSerializer();
  verify(serializationManager, times(2)).deserialize(Matchers.<Input> any());
  verify(executorService, times(1)).scheduleAtFixedRate(Matchers.<Runnable> any(), anyLong(), anyLong(), Matchers.<TimeUnit> any());
  assertThat(helper.isEmpty(), is(true));
}
origin: inspectIT/inspectIT

serializationManager = prototypesProvider.createSerializer();
rocks.inspectit.agent.java.springPrototypesProvider

Javadoc

Provider for all needed prototypes since we don't have spring config files anymore.

Most used methods

  • createSerializer
    Returns the new SerializationManager enhanced by Spring.

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now