Examples of Returns


Examples of org.mockito.internal.stubbing.answers.Returns

  @Test
  public void testDuplicatId() {
    final String webscriptId = "webscriptId";
    AnnotationWebScriptBuilder builder = new AnnotationWebScriptBuilder();
    ConfigurableListableBeanFactory dummyBeanFactory = mock(ConfigurableListableBeanFactory.class);
    when(dummyBeanFactory.getType(webscriptId)).thenAnswer(new Returns(DuplicateIdWebScript.class));
    final DuplicateIdWebScript instance = new DuplicateIdWebScript();
    when(dummyBeanFactory.findAnnotationOnBean(webscriptId, WebScript.class)).thenReturn(instance.getClass().getAnnotation(WebScript.class));
    when(dummyBeanFactory.getBean(webscriptId)).thenReturn(instance);

    builder.setBeanFactory(dummyBeanFactory);
View Full Code Here

Examples of org.mojavemvc.annotations.Returns

   
    private EntityMarshaller getViewEntityMarshaller(Method method, String className) {
       
        EntityMarshaller viewMarshaller = new DefaultEntityMarshaller();
       
        Returns returnsAnnotation = method.getAnnotation(Returns.class);
        if (returnsAnnotation != null) {
            String contentType = returnsAnnotation.value();
            EntityMarshaller marshaller = entityMarshallerMap.get(contentType);
            if (marshaller != null) {
                viewMarshaller = marshaller;
            } else {
                logger.error("could not find view entity marshaller for content type "
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.