use of com.intellij.mock.MockInspectionProfile in project intellij-community by JetBrains.
the class DomHighlightingLiteTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myInspectionProfile = new MockInspectionProfile();
myAnnotationsManager = new DomElementAnnotationsManagerImpl(getProject()) {
@Override
protected InspectionProfile getInspectionProfile(final DomFileElement fileElement) {
return myInspectionProfile;
}
};
final XmlFile file = createXmlFile("<a/>");
final MockDomElement rootElement = new MockDomElement() {
@Override
@Nullable
public XmlElement getXmlElement() {
return getXmlTag();
}
@Override
public XmlTag getXmlTag() {
return file.getRootTag();
}
@NotNull
@Override
public Type getDomElementType() {
return DomElement.class;
}
};
myElement = new MockDomFileElement() {
@Override
@Nullable
public XmlElement getXmlElement() {
return file;
}
@Override
@NotNull
public XmlFile getFile() {
return file;
}
@Override
public DomElement getParent() {
return null;
}
@Override
@NotNull
public DomElement getRootElement() {
return rootElement;
}
@NotNull
@Override
public Class getRootElementClass() {
return DomElement.class;
}
@Override
public boolean isValid() {
return true;
}
};
}
Aggregations