Package gov.nasa.arc.mct.components

Examples of gov.nasa.arc.mct.components.PropertyEditor


    }
   
    @SuppressWarnings({ "rawtypes", "unchecked" })
    private PropertyDescriptor buildMockDescriptor(VisualControlDescriptor vcd) {
        PropertyDescriptor mockDescriptor = Mockito.mock(PropertyDescriptor.class);
        PropertyEditor mockEditor = Mockito.mock(PropertyEditor.class);
       
        Mockito.when(mockDescriptor.getShortDescription()).thenReturn("mock");
        Mockito.when(mockDescriptor.getVisualControlDescriptor()).thenReturn(vcd);
        Mockito.when(mockDescriptor.getPropertyEditor()).thenReturn(mockEditor);
        Mockito.when(mockDescriptor.isFieldMutable()).thenReturn(true);
       
        // Change the result of get() method, to trigger refresh
        Mockito.when(mockEditor.getTags()).thenReturn(Arrays.asList("mock", "other"));
        Mockito.when(mockEditor.getAsText()).thenReturn("mock");
        Mockito.when(mockEditor.getValue()).thenReturn(vcd != VisualControlDescriptor.CheckBox ? "mock" : Boolean.TRUE);      
       
        return mockDescriptor;
    }
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.components.PropertyEditor

Copyright © 2018 www.massapicom. 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.