I'm just going to keep throwing out ideas. timestamp seems to be a
protected item in Run, so subclass!:

class MyFreeStyleBuild extends FreeStyleBuild {
    void setTimestamp(long timestamp) {
      this.timestamp = timestamp;
    }
}

class MyFreeStyleProject extends FreeStyleProject {
    @Override
    protected Class<FreeStyleBuild> getBuildClass() {



        return MyFreeStyleBuild.class;
    }
}

j.createProject(MyFreeStyleProject.class, "test");
((MyFreeStyleBuild) jRule.assertBuildStatus(Result.SUCCESS,
project.scheduleBuild2(0).get()))).setTimestamp(whatever you want);
...



On Tue, Jul 9, 2019 at 3:20 PM Jesse Glick <[email protected]> wrote:

> On Tue, Jul 9, 2019 at 4:47 PM Ullrich Hafner <[email protected]>
> wrote:
> > This topic reminds me of one of my architecture guidelines I’m
> presenting students in my testing lecture:
> > An application should always provide a way to change (or inject) […]
>
> If you are enumerating design flaws in Jenkins APIs which hurt
> testability, you are going to have a very full syllabus. :-)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0duRR8fK%2B-6yLGyNifCEr-%3DvT_HqX8kZ2WzHLOG9cRzw%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_DusCGhpys0ctX%2BXKHJQ-wOpB4w-ypOhqzwAL%3DZ4TCOLb1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to