@Test public void testParseShouldReturnStubDescriptorAttributesWithDefaultActiveValue() { given(root.getAttribute("active")).willReturn(""); StubDescriptorAttributes expectedAttributes = new StubDescriptorAttributes("Default", true); StubDescriptor actual = underTest.parse(document); assertEquals(actual.getAttributes().isActive(), expectedAttributes.isActive()); }
public StubDescriptor parse(final Document document) { Element root = document.getDocumentElement(); StubDescriptorAttributes attributes = getStubDescriptorAttributes(root); List<DialogDescriptor> dialogDescriptors = getDialogDescriptors(document, root); List<InterceptorDescriptor> interceptorDescriptors = getInterceptorDescriptors(document, root); List<SequenceDescriptor> sequenceDescriptors = sequenceDescriptorParser.parse(document, root, dialogDescriptors); return new StubDescriptor(attributes, dialogDescriptors, interceptorDescriptors, sequenceDescriptors); }
StubDescriptorParser { public StubDescriptor parse(final Document document) { Element root = document.getDocumentElement(); StubDescriptorAttributes attributes = getStubDescriptorAttributes(root); List<DialogDescriptor> dialogDescriptors = getDialogDescriptors(document, root); List<InterceptorDescriptor> interceptorDescriptors = getInterceptorDescriptors(document, root); List<SequenceDescriptor> sequenceDescriptors = sequenceDescriptorParser.parse(document, root, dialogDescriptors); return new StubDescriptor(attributes, dialogDescriptors, interceptorDescriptors, sequenceDescriptors); } }
StubDescriptorParser { public StubDescriptor parse(final Document document) { Element root = document.getDocumentElement(); StubDescriptorAttributes attributes = getStubDescriptorAttributes(root); List<DialogDescriptor> dialogDescriptors = getDialogDescriptors(document, root); List<InterceptorDescriptor> interceptorDescriptors = getInterceptorDescriptors(document, root); List<SequenceDescriptor> sequenceDescriptors = sequenceDescriptorParser.parse(document, root, dialogDescriptors); return new StubDescriptor(attributes, dialogDescriptors, interceptorDescriptors, sequenceDescriptors); }  }
StubDescriptorParser { public StubDescriptor parse(final Document document) { Element root = document.getDocumentElement(); StubDescriptorAttributes attributes = getStubDescriptorAttributes(root); List<DialogDescriptor> dialogDescriptors = getDialogDescriptors(document, root); List<InterceptorDescriptor> interceptorDescriptors = getInterceptorDescriptors(document, root); List<SequenceDescriptor> sequenceDescriptors = sequenceDescriptorParser.parse(document, root, dialogDescriptors); return new StubDescriptor(attributes, dialogDescriptors, interceptorDescriptors, sequenceDescriptors); }  StubDescriptor parse(final Document document); }
StubDescriptorParser { public StubDescriptor parse(final Document document) { Element root = document.getDocumentElement(); StubDescriptorAttributes attributes = getStubDescriptorAttributes(root); List<DialogDescriptor> dialogDescriptors = getDialogDescriptors(document, root); List<InterceptorDescriptor> interceptorDescriptors = getInterceptorDescriptors(document, root); List<SequenceDescriptor> sequenceDescriptors = sequenceDescriptorParser.parse(document, root, dialogDescriptors); return new StubDescriptor(attributes, dialogDescriptors, interceptorDescriptors, sequenceDescriptors); }  StubDescriptor parse(final Document document);  }