Examples of TeamCitySpy


Examples of org.netmelody.cieye.spies.teamcity.TeamCitySpy

    givesEmptyStatusForAnUnknownEndpoint() {
        context.checking(new Expectations() {{
            allowing(contact).privileged(); will(returnValue(false));
        }});
       
        final TeamCitySpy spy = new TeamCitySpy("myEndpoint", detective, contact);
       
        final TargetDigestGroup result = spy.targetsConstituting(new Feature("", "myOtherEndpoint", new CiServerType("TEAMCITY")));
       
        assertThat(result, is(Matchers.<TargetDigest>emptyIterable()));
    }
View Full Code Here

Examples of org.netmelody.cieye.spies.teamcity.TeamCitySpy

    logsInUsingGuestAccess() {
        context.checking(new Expectations() {{
            allowing(contact).privileged(); will(returnValue(false));
        }});
       
        final TeamCitySpy spy = new TeamCitySpy("myEndpoint", detective, contact);
       
        context.checking(new Expectations() {{
            oneOf(contact).makeJsonRestCall(with(Matchers.startsWith("myEndpoint/guestAuth")), with(BuildTypes.class));
                will(returnValue(new BuildTypes()));
        }});
       
        spy.targetsConstituting(new Feature("", "myEndpoint", new CiServerType("TEAMCITY")));
       
        context.assertIsSatisfied();
    }
View Full Code Here

Examples of org.netmelody.cieye.spies.teamcity.TeamCitySpy

    logsInUsingBasicHttpAccess() {
        context.checking(new Expectations() {{
            allowing(contact).privileged(); will(returnValue(true));
        }});
       
        final TeamCitySpy spy = new TeamCitySpy("myEndpoint", detective, contact);
       
        context.checking(new Expectations() {{
            oneOf(contact).makeJsonRestCall(with(Matchers.startsWith("myEndpoint/httpAuth")), with(BuildTypes.class));
            will(returnValue(new BuildTypes()));
        }});
       
        spy.targetsConstituting(new Feature("", "myEndpoint", new CiServerType("TEAMCITY")));
       
        context.assertIsSatisfied();
    }
View Full Code Here

Examples of org.netmelody.cieye.spies.teamcity.TeamCitySpy

    lazilyRetrievesBuildTypeDetails() {
        context.checking(new Expectations() {{
            allowing(contact).privileged(); will(returnValue(false));
        }});

        final TeamCitySpy spy = new TeamCitySpy("myEndpoint", detective, contact);
       
        context.checking(new Expectations() {{
            allowing(contact).makeJsonRestCall(with(any(String.class)), with(BuildTypes.class));
                will(returnValue(buildTypesForProjectsNamed("myFeatureName")));
            allowing(contact).makeJsonRestCall(with(any(String.class)), with(ProjectDetail.class));
                will(returnValue(projectNamed("myTarget")));
           
            never(contact).makeJsonRestCall(with(any(String.class)), with(BuildTypeDetail.class));
        }});
       
        final TargetDigestGroup digest = spy.targetsConstituting(new Feature("myFeatureName", "myEndpoint", new CiServerType("TEAMCITY")));
        context.assertIsSatisfied();
       
        context.checking(new Expectations() {{
            oneOf(contact).makeJsonRestCall(with(any(String.class)), with(BuildTypeDetail.class));
                will(returnValue(buildTypeDetail()));
            allowing(contact).makeJsonRestCall(with(any(String.class)), with(Builds.class));
                will(returnValue(new Builds()));
        }});
       
        spy.statusOf(digest.iterator().next().id());
        context.assertIsSatisfied();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.