Wie zum Hohn das 'new' - operator

Teste ich einige groovy-code, der verwendet, eine java-Bibliothek, und ich will mock aus der library aufrufen, da Sie das Netzwerk nutzen. Also der getestete code in etwa so aussieht:

def verifyInformation(String information) {
    def request = new OusideLibraryRequest().compose(information)
    new OutsideLibraryClient().verify(request)
}

Versuchte ich mit MockFor und StubFor aber ich bekomme Fehler wie:

No signature of method: com.myproject.OutsideLibraryTests.MockFor() is applicable for argument types: (java.lang.Class) values: [class com.otherCompany.OusideLibraryRequest]  

Bin ich mit Grails 2.0.3.

InformationsquelleAutor user1394451 | 2012-05-14
Schreibe einen Kommentar