mocking non-public stationary methods summary classes jmockit?


i have following class:



public summary category abstractparent {
stationary twine method() {
relapse "originaloutput";
}
}


i wish ridicule method. i endorse . i emanate ridicule class:



public category mockparent {
stationary twine method() {
relapse "mock";
}
}


and exam formula looks this:



public category realparenttest {

@before
open vacant setup() throws difference {
mockit.redefinemethods( abstractparent.class, mockparent.class );
}


@test
open vacant testmethod() {
assertequals(mockparent.method(),abstractparent.method());
}

}


unfortunately exam says abstractparent advantage "originaloutput" instead "mock". any ideas why? am i doing something wrong? i've attempted dogmatic ridicule category summary well, avail.



edit note origination slight open causes exam run but problem... uncanny since jmockit ostensible means ridicule methods any scope.



answer wholly ridicule slight needs public, leave uncanny slight is.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?