src_fm_fc_ms_ff
stringlengths
43
86.8k
target
stringlengths
20
276k
Movement implements Action { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Movement other = (Movement) obj; if (mLeftWheelVelocity != other.mLeftWheelVelocity) return false; if (mRightWheelVelocity != other.mRightWheelVelocity) return false; return true; } Movement( int aRightWheelVelocity, int aLeftWheelVelocity ); int getmRightWheelVelocity(); int getmLeftWheelVelocity(); @Override String getXMLString(); @Override int hashCode(); @Override boolean equals(Object obj); static final Movement NO_MOVEMENT; }
@Test public void testEqualsWithDifferentRightWheelVelocity() { Movement movement1 = new Movement(51,50); Movement movement2 = new Movement(49,50); assertThat(movement1.equals(movement2)).isEqualTo(false); } @Test public void testEqualsWithSameValues() { Movement movement1 = new Movement(50,50); Movement movement2 = new Movement(50,50); assertThat(movement1.equals(movement2)).isEqualTo(true); } @Test public void testEqualsWithSameObject() { Movement movement = new Movement(51,50); assertThat(movement.equals(movement)).isEqualTo(true); } @Test public void testEqualsWithObjectIsNull() { Movement movement = new Movement(51,50); assertThat(movement.equals(null)).isEqualTo(false); } @Test public void testEqualsWithDifferentClass() { Movement movement = new Movement(51,50); assertThat(movement.equals(new Integer(12))).isEqualTo(false); } @Test public void testEqualsWithDifferentLeftWheelVelocity() { Movement movement1 = new Movement(51,50); Movement movement2 = new Movement(51,49); assertThat(movement1.equals(movement2)).isEqualTo(false); }
RawWorldData implements WorldData { public void setBallPosition(BallPosition ballPos){ mBallPosition = ballPos != null ? ballPos : new BallPosition(); } static RawWorldData createRawWorldDataFromXML( String aXMLData ); @XmlTransient double getPlayTime(); @XmlTransient PlayMode getPlayMode(); @XmlTransient Score getScore(); @XmlTransient int getAgentId(); @XmlTransient String getAgentNickname(); @XmlTransient Boolean getAgentStatus(); @XmlTransient int getMaxNumberOfAgents(); @XmlTransient BallPosition getBallPosition(); @XmlTransient List<FellowPlayer> getListOfTeamMates(); @XmlTransient List<FellowPlayer> getListOfOpponents(); @XmlTransient ReferencePoint getCenterLineBottom(); @XmlTransient ReferencePoint getYellowFieldCornerBottom(); @XmlTransient ReferencePoint getYellowPenaltyAreaFrontBottom(); @XmlTransient ReferencePoint getYellowGoalCornerBottom(); @XmlTransient ReferencePoint getYellowGoalAreaFrontBottom(); @XmlTransient ReferencePoint getBlueFieldCornerBottom(); @XmlTransient ReferencePoint getBluePenaltyAreaFrontBottom(); @XmlTransient ReferencePoint getBlueGoalCornerBottom(); @XmlTransient ReferencePoint getBlueGoalAreaFrontBottom(); @XmlTransient ReferencePoint getFieldCenter(); @XmlTransient ReferencePoint getCenterLineTop(); @XmlTransient ReferencePoint getYellowFieldCornerTop(); @XmlTransient ReferencePoint getYellowPenaltyAreaFrontTop(); @XmlTransient ReferencePoint getYellowGoalCornerTop(); @XmlTransient ReferencePoint getYellowGoalAreaFrontTop(); @XmlTransient ReferencePoint getBlueFieldCornerTop(); @XmlTransient ReferencePoint getBluePenaltyAreaFrontTop(); @XmlTransient ReferencePoint getBlueGoalCornerTop(); @XmlTransient ReferencePoint getBlueGoalAreaFrontTop(); @XmlTransient void setOpponentPlayer(FellowPlayer player); @XmlTransient void setFellowPlayer(FellowPlayer player); void setBallPosition(BallPosition ballPos); @XmlTransient List<ReferencePoint> getReferencePoints(); ReferencePoint getReferencePoint( ReferencePointName aName ); String toXMLString(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test public void setBallPositionTest() { BallPosition bp = new BallPosition(30, 40, true); rawWorldDataSpy.setBallPosition(bp); assert(rawWorldDataSpy.getBallPosition().equals(bp)); }
RawWorldData implements WorldData { @XmlTransient public List<ReferencePoint> getReferencePoints() { return mReferencePoints; } static RawWorldData createRawWorldDataFromXML( String aXMLData ); @XmlTransient double getPlayTime(); @XmlTransient PlayMode getPlayMode(); @XmlTransient Score getScore(); @XmlTransient int getAgentId(); @XmlTransient String getAgentNickname(); @XmlTransient Boolean getAgentStatus(); @XmlTransient int getMaxNumberOfAgents(); @XmlTransient BallPosition getBallPosition(); @XmlTransient List<FellowPlayer> getListOfTeamMates(); @XmlTransient List<FellowPlayer> getListOfOpponents(); @XmlTransient ReferencePoint getCenterLineBottom(); @XmlTransient ReferencePoint getYellowFieldCornerBottom(); @XmlTransient ReferencePoint getYellowPenaltyAreaFrontBottom(); @XmlTransient ReferencePoint getYellowGoalCornerBottom(); @XmlTransient ReferencePoint getYellowGoalAreaFrontBottom(); @XmlTransient ReferencePoint getBlueFieldCornerBottom(); @XmlTransient ReferencePoint getBluePenaltyAreaFrontBottom(); @XmlTransient ReferencePoint getBlueGoalCornerBottom(); @XmlTransient ReferencePoint getBlueGoalAreaFrontBottom(); @XmlTransient ReferencePoint getFieldCenter(); @XmlTransient ReferencePoint getCenterLineTop(); @XmlTransient ReferencePoint getYellowFieldCornerTop(); @XmlTransient ReferencePoint getYellowPenaltyAreaFrontTop(); @XmlTransient ReferencePoint getYellowGoalCornerTop(); @XmlTransient ReferencePoint getYellowGoalAreaFrontTop(); @XmlTransient ReferencePoint getBlueFieldCornerTop(); @XmlTransient ReferencePoint getBluePenaltyAreaFrontTop(); @XmlTransient ReferencePoint getBlueGoalCornerTop(); @XmlTransient ReferencePoint getBlueGoalAreaFrontTop(); @XmlTransient void setOpponentPlayer(FellowPlayer player); @XmlTransient void setFellowPlayer(FellowPlayer player); void setBallPosition(BallPosition ballPos); @XmlTransient List<ReferencePoint> getReferencePoints(); ReferencePoint getReferencePoint( ReferencePointName aName ); String toXMLString(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test public void getReferencePointsTest() { List<ReferencePoint> refPoints = rawWorldData.getReferencePoints(); assert(refPoints==null); }
RawWorldData implements WorldData { public ReferencePoint getReferencePoint( ReferencePointName aName ) { if( mReferencePoints.get( aName.getPosition() ).getPointName() == aName ){ return mReferencePoints.get( aName.getPosition() ); } for( ReferencePoint vPoint : mReferencePoints ){ if( vPoint.getPointName() == aName ){ return vPoint; } } return null; } static RawWorldData createRawWorldDataFromXML( String aXMLData ); @XmlTransient double getPlayTime(); @XmlTransient PlayMode getPlayMode(); @XmlTransient Score getScore(); @XmlTransient int getAgentId(); @XmlTransient String getAgentNickname(); @XmlTransient Boolean getAgentStatus(); @XmlTransient int getMaxNumberOfAgents(); @XmlTransient BallPosition getBallPosition(); @XmlTransient List<FellowPlayer> getListOfTeamMates(); @XmlTransient List<FellowPlayer> getListOfOpponents(); @XmlTransient ReferencePoint getCenterLineBottom(); @XmlTransient ReferencePoint getYellowFieldCornerBottom(); @XmlTransient ReferencePoint getYellowPenaltyAreaFrontBottom(); @XmlTransient ReferencePoint getYellowGoalCornerBottom(); @XmlTransient ReferencePoint getYellowGoalAreaFrontBottom(); @XmlTransient ReferencePoint getBlueFieldCornerBottom(); @XmlTransient ReferencePoint getBluePenaltyAreaFrontBottom(); @XmlTransient ReferencePoint getBlueGoalCornerBottom(); @XmlTransient ReferencePoint getBlueGoalAreaFrontBottom(); @XmlTransient ReferencePoint getFieldCenter(); @XmlTransient ReferencePoint getCenterLineTop(); @XmlTransient ReferencePoint getYellowFieldCornerTop(); @XmlTransient ReferencePoint getYellowPenaltyAreaFrontTop(); @XmlTransient ReferencePoint getYellowGoalCornerTop(); @XmlTransient ReferencePoint getYellowGoalAreaFrontTop(); @XmlTransient ReferencePoint getBlueFieldCornerTop(); @XmlTransient ReferencePoint getBluePenaltyAreaFrontTop(); @XmlTransient ReferencePoint getBlueGoalCornerTop(); @XmlTransient ReferencePoint getBlueGoalAreaFrontTop(); @XmlTransient void setOpponentPlayer(FellowPlayer player); @XmlTransient void setFellowPlayer(FellowPlayer player); void setBallPosition(BallPosition ballPos); @XmlTransient List<ReferencePoint> getReferencePoints(); ReferencePoint getReferencePoint( ReferencePointName aName ); String toXMLString(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test public void getReferencePointTestNA() { ReferencePoint mockedBottomCenter = mock(ReferencePoint.class); rawWorldData.mReferencePoints = new ArrayList<>(); rawWorldData.mReferencePoints.add(0, new ReferencePoint()); rawWorldData.mReferencePoints.add(0, new ReferencePoint()); when(mockedBottomCenter.getPointName()).thenReturn((ReferencePointName.CenterLineBottom)); ReferencePoint noRefPoint = rawWorldData.getReferencePoint(ReferencePointName.CenterLineBottom); assertThat(noRefPoint).isNull(); }
FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; if (Double.doubleToLongBits(mOrientation) != Double.doubleToLongBits(other.mOrientation)) return false; if (mStatus == null) { if (other.mStatus != null) return false; } else if (!mStatus.equals(other.mStatus)) return false; return true; } FellowPlayer(); FellowPlayer(int aId, String aNickname, Boolean aStatus, double aDistanceToPlayer, double aAngleToPlayer, double aOrientation); @XmlElement(name="id") int getId(); @XmlTransient String getNickname(); @XmlTransient Boolean getStatus(); @XmlTransient double getDistanceToPlayer(); @XmlTransient double getAngleToPlayer(); @XmlTransient double getOrientation(); @Override String toString(); @Override boolean equals(Object obj); }
@Test public void equalsTestEqual() { fellowPlayerCompare = new FellowPlayer(5, "Bob", true, 130.7, 70.3, 0); assert(fellowPlayerOriginal.equals(fellowPlayerCompare)); } @Test public void equalsTestSameInstance() { assert(fellowPlayerOriginal.equals(fellowPlayerOriginal)); } @Test public void equalsTestWrongClass() { RawWorldData rwd = new RawWorldData(); assert(!fellowPlayerOriginal.equals(rwd)); } @Test public void equalsTestWrongID() { fellowPlayerCompare = new FellowPlayer(6, "Bob", true, 130.7, 70.3, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } @Test public void equalsTestWrongName() { fellowPlayerCompare = new FellowPlayer(5, "Bill", true, 130.7, 70.3, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } @Test public void equalsTestWrongStatus() { fellowPlayerCompare = new FellowPlayer(5, "Bob", false, 130.7, 70.3, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } @Test public void equalsTestWrongDistance() { fellowPlayerCompare = new FellowPlayer(5, "Bob", true, 130.8, 70.3, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } @Test public void equalsTestWrongAngle() { fellowPlayerCompare = new FellowPlayer(5, "Bob", true, 130.7, 70.4, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } @Test public void equalsTestWrongOrientation() { fellowPlayerCompare = new FellowPlayer(5, "Bob", true, 130.7, 70.3, 0.2); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } @Test public void equalsTestNoNickname() { fellowPlayerCompare = new FellowPlayer(5, null, true, 130.7, 70.3, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } @Test public void equalsTestNoNicknameSwitched() { fellowPlayerCompare = new FellowPlayer(5, null, true, 130.7, 70.3, 0); assert(!fellowPlayerCompare.equals(fellowPlayerOriginal)); } @Test public void equalsTestNoNicknameBoth() { fellowPlayerCompare = new FellowPlayer(5, null, true, 130.7, 70.3, 0); FellowPlayer fellowPlayerOriginalLocal = new FellowPlayer(5, null, true, 130.7, 70.3, 0); assert(fellowPlayerOriginalLocal.equals(fellowPlayerCompare)); } @Test public void equalsTestNoStatus() { fellowPlayerCompare = new FellowPlayer(5, "Bob", null, 130.7, 70.3, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } @Test public void equalsTestNoStatusSwitched() { fellowPlayerCompare = new FellowPlayer(5, "Bob", null, 130.7, 70.3, 0); assert(!fellowPlayerCompare.equals(fellowPlayerOriginal)); } @Test public void equalsTestNoStatusBoth() { fellowPlayerCompare = new FellowPlayer(5, "Bob", null, 130.7, 70.3, 0); FellowPlayer fellowPlayerOriginalLocal = new FellowPlayer(5, "Bob", null, 130.7, 70.3, 0); assert(fellowPlayerCompare.equals(fellowPlayerOriginalLocal)); }
BotInformation implements Serializable { public synchronized String toString() { String vBotInformationString = "Bot " + getBotname() + "(" + getRcId() + "/" + getVtId() + ")\n"; vBotInformationString += "with Address: " + getBotIP().toString() + " Port: " + getBotPort(); vBotInformationString += getReconnect()?" (Reconnected)":"" + "\n"; vBotInformationString += "on Team " + getTeamname() + "(" + getTeam().toString() + ")" + " Port: " + getServerPort() + "\n"; vBotInformationString += "on Server: " + getServerIP().toString() + "\n"; vBotInformationString += "with Values:\n"; for ( GamevalueNames aGamevalueName : GamevalueNames.values() ) { vBotInformationString += aGamevalueName.toString() + " = " + aGamevalueName.getValue() + "\n"; } vBotInformationString += "The AI " + getAIClassname() + " starts from " + getAIArchive() + " with parameters: \n"; vBotInformationString += getAIArgs() + "\n"; vBotInformationString += getBotMemory()!=null?getBotMemory().toString() + "\n":""; return vBotInformationString; } BotInformation(); static synchronized Logger getLogger(); synchronized String getBotname(); synchronized int getRcId(); synchronized int getVtId(); synchronized InetAddress getBotIP(); synchronized int getBotPort(); synchronized InetAddress getServerIP(); synchronized int getServerPort(); synchronized Teams getTeam(); synchronized String getTeamname(); synchronized float getGamevalue( GamevalueNames aGamevalueName ); synchronized boolean getReconnect(); synchronized String getAIArgs(); synchronized void setAIArgs( String aAiArgs ); synchronized String getAIArchive(); synchronized void setAIArchive( String aAIArchive ); synchronized String getAIClassname(); synchronized Object getBotMemory(); synchronized void setBotMemory( Object aBotMemory ); synchronized void setAIClassname( String aAIClassname ); synchronized void setReconnect( boolean aReconnect); synchronized void setGamevalue( GamevalueNames aGamevalueName, float aGamevalue ); synchronized void setTeamname( String aTeamname ); synchronized void setTeam( Teams aTeam ); synchronized void setServerPort( int aServerPort ); synchronized void setServerIP( InetAddress aServerIP ); synchronized void setBotPort( int aBotPort ); synchronized void setBotIP( InetAddress aBotIP ); synchronized void setVtId( int aVtId ); synchronized void setRcId( int aRcId ); synchronized void setBotname( String aBotname ); synchronized String toString(); }
@Test public void testGetAllGamevalueNamesAsAString() { String gvString = new String(); for ( BotInformation.GamevalueNames vGamevalueName : BotInformation.GamevalueNames.values() ) { gvString += vGamevalueName.toString() + " "; } assertThat(BotInformation.GamevalueNames.getAllGamevalueNamesAsAString()).isEqualTo(gvString); } @Test public void testGetGamevalueNamesAsStringArray() { int i = 0; String[] gvStrings= new String[BotInformation.GamevalueNames.values().length]; for ( BotInformation.GamevalueNames vGamevalueName : BotInformation.GamevalueNames.values() ) { gvStrings[i] = vGamevalueName.toString(); i++; } assertThat(BotInformation.GamevalueNames.getGamevalueNamesAsStringArray()).isEqualTo(gvStrings); }
FellowPlayer extends ReferencePoint { @Override void setPointName( ReferencePointName aPointName ) { super.setPointName( ReferencePointName.Player ); mId = IDCOUNTER++; } FellowPlayer(); FellowPlayer(int aId, String aNickname, Boolean aStatus, double aDistanceToPlayer, double aAngleToPlayer, double aOrientation); @XmlElement(name="id") int getId(); @XmlTransient String getNickname(); @XmlTransient Boolean getStatus(); @XmlTransient double getDistanceToPlayer(); @XmlTransient double getAngleToPlayer(); @XmlTransient double getOrientation(); @Override String toString(); @Override boolean equals(Object obj); }
@Test public void setPointNameText() { FellowPlayer fellowPlayer = new FellowPlayer(); int IDCountBefore = FellowPlayer.IDCOUNTER ; fellowPlayer.setPointName(ReferencePointName.Ball); int IDCountAfter = FellowPlayer.IDCOUNTER; assert(IDCountBefore+1==IDCountAfter); }
ReferencePoint { public void setXOfPoint( double aXValue ) { mX = aXValue; set( mX, mY, false ); } ReferencePoint( ); @Deprecated ReferencePoint( double aDistanceToPoint, double aAngleToPoint ); ReferencePoint( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint( ReferencePoint aReferencePoint ); @XmlElement(name="id") ReferencePointName getPointName(); @XmlElement(name="dist") double getDistanceToPoint(); void setDistanceToPoint( double aDistance ); @XmlElement(name="angle") double getAngleToPoint(); void setAngleToPoint( double aAngle ); @XmlElement(name="xvalue") double getXOfPoint(); void setXOfPoint( double aXValue ); @XmlElement(name="yvalue") double getYOfPoint(); void setYOfPoint( double aYValue ); ReferencePoint copy(); ReferencePoint set( ReferencePoint aReferencePoint ); ReferencePoint set( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint sub( double aScalar ); ReferencePoint sub( ReferencePoint aReferencePoint ); ReferencePoint add( ReferencePoint aReferencePoint ); ReferencePoint multiply( double scalar ); boolean epsilonEquals( ReferencePoint aReferencePoint, double aEpsilon ); boolean epsilonEquals( double aX, double aY, double aEpsilon ); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test public void testSetXOfPoint() { ReferencePoint referencePoint = new ReferencePoint(); referencePoint.setXOfPoint(10); assertThat(referencePoint.getXOfPoint()).isCloseTo(10, Percentage.withPercentage(1)); }
ReferencePoint { public void setYOfPoint( double aYValue ) { mY = aYValue; set( mX, mY, false ); } ReferencePoint( ); @Deprecated ReferencePoint( double aDistanceToPoint, double aAngleToPoint ); ReferencePoint( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint( ReferencePoint aReferencePoint ); @XmlElement(name="id") ReferencePointName getPointName(); @XmlElement(name="dist") double getDistanceToPoint(); void setDistanceToPoint( double aDistance ); @XmlElement(name="angle") double getAngleToPoint(); void setAngleToPoint( double aAngle ); @XmlElement(name="xvalue") double getXOfPoint(); void setXOfPoint( double aXValue ); @XmlElement(name="yvalue") double getYOfPoint(); void setYOfPoint( double aYValue ); ReferencePoint copy(); ReferencePoint set( ReferencePoint aReferencePoint ); ReferencePoint set( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint sub( double aScalar ); ReferencePoint sub( ReferencePoint aReferencePoint ); ReferencePoint add( ReferencePoint aReferencePoint ); ReferencePoint multiply( double scalar ); boolean epsilonEquals( ReferencePoint aReferencePoint, double aEpsilon ); boolean epsilonEquals( double aX, double aY, double aEpsilon ); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test public void testSetYOfPoint() { ReferencePoint referencePoint = new ReferencePoint(); referencePoint.setYOfPoint(10); assertThat(referencePoint.getYOfPoint()).isCloseTo(10, Percentage.withPercentage(1)); }
ReferencePoint { public ReferencePoint copy () { return new ReferencePoint( this ); } ReferencePoint( ); @Deprecated ReferencePoint( double aDistanceToPoint, double aAngleToPoint ); ReferencePoint( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint( ReferencePoint aReferencePoint ); @XmlElement(name="id") ReferencePointName getPointName(); @XmlElement(name="dist") double getDistanceToPoint(); void setDistanceToPoint( double aDistance ); @XmlElement(name="angle") double getAngleToPoint(); void setAngleToPoint( double aAngle ); @XmlElement(name="xvalue") double getXOfPoint(); void setXOfPoint( double aXValue ); @XmlElement(name="yvalue") double getYOfPoint(); void setYOfPoint( double aYValue ); ReferencePoint copy(); ReferencePoint set( ReferencePoint aReferencePoint ); ReferencePoint set( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint sub( double aScalar ); ReferencePoint sub( ReferencePoint aReferencePoint ); ReferencePoint add( ReferencePoint aReferencePoint ); ReferencePoint multiply( double scalar ); boolean epsilonEquals( ReferencePoint aReferencePoint, double aEpsilon ); boolean epsilonEquals( double aX, double aY, double aEpsilon ); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test public void testCopy() { ReferencePoint referencePoint = new ReferencePoint(10,15,false); ReferencePoint copyOfReferencePoint = referencePoint.copy(); assertThat(copyOfReferencePoint).isNotNull(); assertThat(copyOfReferencePoint).isInstanceOf(ReferencePoint.class); assertThat(copyOfReferencePoint.getXOfPoint()).isCloseTo(10, Percentage.withPercentage(1)); assertThat(copyOfReferencePoint.getYOfPoint()).isCloseTo(15, Percentage.withPercentage(1)); }
ReferencePoint { public ReferencePoint set ( ReferencePoint aReferencePoint ) { mDistanceToPoint = aReferencePoint.getDistanceToPoint(); mAngleToPoint = aReferencePoint.getAngleToPoint(); mX = aReferencePoint.getXOfPoint(); mY = aReferencePoint.getYOfPoint(); mPointName = ReferencePointName.NoFixedName; return this; } ReferencePoint( ); @Deprecated ReferencePoint( double aDistanceToPoint, double aAngleToPoint ); ReferencePoint( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint( ReferencePoint aReferencePoint ); @XmlElement(name="id") ReferencePointName getPointName(); @XmlElement(name="dist") double getDistanceToPoint(); void setDistanceToPoint( double aDistance ); @XmlElement(name="angle") double getAngleToPoint(); void setAngleToPoint( double aAngle ); @XmlElement(name="xvalue") double getXOfPoint(); void setXOfPoint( double aXValue ); @XmlElement(name="yvalue") double getYOfPoint(); void setYOfPoint( double aYValue ); ReferencePoint copy(); ReferencePoint set( ReferencePoint aReferencePoint ); ReferencePoint set( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint sub( double aScalar ); ReferencePoint sub( ReferencePoint aReferencePoint ); ReferencePoint add( ReferencePoint aReferencePoint ); ReferencePoint multiply( double scalar ); boolean epsilonEquals( ReferencePoint aReferencePoint, double aEpsilon ); boolean epsilonEquals( double aX, double aY, double aEpsilon ); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test(expected = IllegalArgumentException.class) public void testSetWithPolarcoordinatesWithNegativeDistance() { ReferencePoint referencePoint = new ReferencePoint(); referencePoint.set(-5,25,true); } @Test(expected = IllegalArgumentException.class) public void testSetWithPolarcoordinatesWithToSmallAngle() { ReferencePoint referencePoint = new ReferencePoint(); referencePoint.set(13,-190,true); } @Test(expected = IllegalArgumentException.class) public void testSetWithPolarcoordinatesWithToBigAngle() { ReferencePoint referencePoint = new ReferencePoint(); referencePoint.set(13,190,true); }
ReferencePoint { public ReferencePoint add( ReferencePoint aReferencePoint ) { mX += aReferencePoint.mX; mY += aReferencePoint.mY; return set( mX, mY, false ); } ReferencePoint( ); @Deprecated ReferencePoint( double aDistanceToPoint, double aAngleToPoint ); ReferencePoint( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint( ReferencePoint aReferencePoint ); @XmlElement(name="id") ReferencePointName getPointName(); @XmlElement(name="dist") double getDistanceToPoint(); void setDistanceToPoint( double aDistance ); @XmlElement(name="angle") double getAngleToPoint(); void setAngleToPoint( double aAngle ); @XmlElement(name="xvalue") double getXOfPoint(); void setXOfPoint( double aXValue ); @XmlElement(name="yvalue") double getYOfPoint(); void setYOfPoint( double aYValue ); ReferencePoint copy(); ReferencePoint set( ReferencePoint aReferencePoint ); ReferencePoint set( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint sub( double aScalar ); ReferencePoint sub( ReferencePoint aReferencePoint ); ReferencePoint add( ReferencePoint aReferencePoint ); ReferencePoint multiply( double scalar ); boolean epsilonEquals( ReferencePoint aReferencePoint, double aEpsilon ); boolean epsilonEquals( double aX, double aY, double aEpsilon ); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test public void testAdd() { ReferencePoint referencePoint = new ReferencePoint(50,20,false); ReferencePoint plusReferencePoint = new ReferencePoint(10,10, false); referencePoint.add(plusReferencePoint); assertThat(referencePoint.getXOfPoint()).isCloseTo(60,Percentage.withPercentage(1)); assertThat(referencePoint.getYOfPoint()).isCloseTo(30, Percentage.withPercentage(1)); }
ReferencePoint { public ReferencePoint multiply( double scalar ) { mX *= scalar; mY *= scalar; return set( mX, mY, false ); } ReferencePoint( ); @Deprecated ReferencePoint( double aDistanceToPoint, double aAngleToPoint ); ReferencePoint( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint( ReferencePoint aReferencePoint ); @XmlElement(name="id") ReferencePointName getPointName(); @XmlElement(name="dist") double getDistanceToPoint(); void setDistanceToPoint( double aDistance ); @XmlElement(name="angle") double getAngleToPoint(); void setAngleToPoint( double aAngle ); @XmlElement(name="xvalue") double getXOfPoint(); void setXOfPoint( double aXValue ); @XmlElement(name="yvalue") double getYOfPoint(); void setYOfPoint( double aYValue ); ReferencePoint copy(); ReferencePoint set( ReferencePoint aReferencePoint ); ReferencePoint set( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint sub( double aScalar ); ReferencePoint sub( ReferencePoint aReferencePoint ); ReferencePoint add( ReferencePoint aReferencePoint ); ReferencePoint multiply( double scalar ); boolean epsilonEquals( ReferencePoint aReferencePoint, double aEpsilon ); boolean epsilonEquals( double aX, double aY, double aEpsilon ); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test public void testMultiply() { ReferencePoint referencePoint = new ReferencePoint(50,20, false); referencePoint.multiply(2.0); assertThat(referencePoint.getXOfPoint()).isCloseTo(100, Percentage.withPercentage(1)); assertThat(referencePoint.getYOfPoint()).isCloseTo(40,Percentage.withPercentage(1)); }
ReferencePoint { public boolean epsilonEquals ( ReferencePoint aReferencePoint, double aEpsilon ) { return aReferencePoint != null && (Math.abs(aReferencePoint.getXOfPoint() - mX) <= aEpsilon) && (Math.abs(aReferencePoint.getYOfPoint() - mY) <= aEpsilon); } ReferencePoint( ); @Deprecated ReferencePoint( double aDistanceToPoint, double aAngleToPoint ); ReferencePoint( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint( ReferencePoint aReferencePoint ); @XmlElement(name="id") ReferencePointName getPointName(); @XmlElement(name="dist") double getDistanceToPoint(); void setDistanceToPoint( double aDistance ); @XmlElement(name="angle") double getAngleToPoint(); void setAngleToPoint( double aAngle ); @XmlElement(name="xvalue") double getXOfPoint(); void setXOfPoint( double aXValue ); @XmlElement(name="yvalue") double getYOfPoint(); void setYOfPoint( double aYValue ); ReferencePoint copy(); ReferencePoint set( ReferencePoint aReferencePoint ); ReferencePoint set( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint sub( double aScalar ); ReferencePoint sub( ReferencePoint aReferencePoint ); ReferencePoint add( ReferencePoint aReferencePoint ); ReferencePoint multiply( double scalar ); boolean epsilonEquals( ReferencePoint aReferencePoint, double aEpsilon ); boolean epsilonEquals( double aX, double aY, double aEpsilon ); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test public void testEpsilonEqualsReferencePointExactCorrect() { ReferencePoint referencePoint = new ReferencePoint(50,20,false); Boolean result = referencePoint.epsilonEquals(new ReferencePoint(50,20,false),0); assertThat(result).isEqualTo(true); } @Test public void testEpsilonEqualsReferencePointNotExactCorrect() { ReferencePoint referencePoint = new ReferencePoint(50,20,false); Boolean result = referencePoint.epsilonEquals(new ReferencePoint(51,19,false),2); assertThat(result).isEqualTo(true); } @Test public void testEpsilonEqualsReferencePointExactNotCorrect() { ReferencePoint referencePoint = new ReferencePoint(50,20,false); Boolean result = referencePoint.epsilonEquals(new ReferencePoint(100, 38, false), 0); assertThat(result).isEqualTo(false); } @Test public void testEpsilonEqualsReferencePointNotExactNotCorrect() { ReferencePoint referencePoint = new ReferencePoint(50,20, false); Boolean result = referencePoint.epsilonEquals(new ReferencePoint(100,38,false), 2); assertThat(result).isEqualTo(false); } @Test public void testEpsilonEqualsReferencePointWithReferencePointIsNull() { ReferencePoint referencePoint = new ReferencePoint(50,20,false); Boolean result = referencePoint.epsilonEquals(null,0); assertThat(result).isEqualTo(false); } @Test public void testEpsilonEqualsReferencePointYSmallerThanEpsilon() { ReferencePoint referencePoint = new ReferencePoint(50,20,false); Boolean result = referencePoint.epsilonEquals(new ReferencePoint(50,0,false),1); assertThat(result).isEqualTo(false); } @Test public void testEpsilonEqualsDoubleNotExactIsTrue() { ReferencePoint referencePoint = new ReferencePoint(50,20,false); Boolean result = referencePoint.epsilonEquals(51.0,19.0,2); assertThat(result).isEqualTo(true); } @Test public void testEpsilonEqualsDoubleNotExactIsFalse() { ReferencePoint referencePoint = new ReferencePoint(50,20,false); Boolean result = referencePoint.epsilonEquals(50.0,0.0,1); assertThat(result).isEqualTo(false); } @Test public void testEpsilonEqualsDoubleExactIsTrue() { ReferencePoint referencePoint = new ReferencePoint(50,20,false); Boolean result = referencePoint.epsilonEquals(50.0,20.0,0); assertThat(result).isEqualTo(true); } @Test public void testEpsilonEqualsDoubleExactIsFalse() { ReferencePoint referencePoint = new ReferencePoint(50,20,false); Boolean result = referencePoint.epsilonEquals(138.0,31.0,0); assertThat(result).isEqualTo(false); }
Kick implements Action { @Override public String getXMLString() { return "<command> <kick> <angle>" + mAngle + "</angle> <force>" + mForce + "</force> </kick> </command>"; } Kick( double aAngle, float aForce); @Override String getXMLString(); double getAngle(); float getForce(); }
@Test public void getXMLString() throws Exception { Kick kick = new Kick(90.1, (float) 21.0); assertThat(kick.getXMLString()).isEqualTo("<command> <kick> <angle>90.1</angle> <force>21.0</force> </kick> </command>"); }
ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ReferencePoint other = (ReferencePoint) obj; if (Double.doubleToLongBits(mAngleToPoint) != Double.doubleToLongBits(other.mAngleToPoint)) return false; if (Double.doubleToLongBits(mDistanceToPoint) != Double.doubleToLongBits(other.mDistanceToPoint)) return false; if (mPointName != other.mPointName) return false; if (Double.doubleToLongBits(mX) != Double.doubleToLongBits(other.mX)) return false; if (Double.doubleToLongBits(mY) != Double.doubleToLongBits(other.mY)) return false; return true; } ReferencePoint( ); @Deprecated ReferencePoint( double aDistanceToPoint, double aAngleToPoint ); ReferencePoint( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint( ReferencePoint aReferencePoint ); @XmlElement(name="id") ReferencePointName getPointName(); @XmlElement(name="dist") double getDistanceToPoint(); void setDistanceToPoint( double aDistance ); @XmlElement(name="angle") double getAngleToPoint(); void setAngleToPoint( double aAngle ); @XmlElement(name="xvalue") double getXOfPoint(); void setXOfPoint( double aXValue ); @XmlElement(name="yvalue") double getYOfPoint(); void setYOfPoint( double aYValue ); ReferencePoint copy(); ReferencePoint set( ReferencePoint aReferencePoint ); ReferencePoint set( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint sub( double aScalar ); ReferencePoint sub( ReferencePoint aReferencePoint ); ReferencePoint add( ReferencePoint aReferencePoint ); ReferencePoint multiply( double scalar ); boolean epsilonEquals( ReferencePoint aReferencePoint, double aEpsilon ); boolean epsilonEquals( double aX, double aY, double aEpsilon ); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test public void testEqualsSameObject() { ReferencePoint referencePoint = new ReferencePoint(); Boolean result = referencePoint.equals(referencePoint); assertThat(result).isEqualTo(true); } @Test public void testEqualsObjectIsNull() { ReferencePoint referencePoint = new ReferencePoint(); Boolean result = referencePoint.equals(null); assertThat(result).isEqualTo(false); } @Test public void testEqualsObjectIsOtherClass() { ReferencePoint referencePoint = new ReferencePoint(); Boolean result = referencePoint.equals(new Double(1.2)); assertThat(result).isEqualTo(false); }
Movement implements Action { @Override public String getXMLString() { return "<command> <wheel_velocities> <right>" + mRightWheelVelocity + "</right> <left>" + mLeftWheelVelocity + "</left> </wheel_velocities> </command>"; } Movement( int aRightWheelVelocity, int aLeftWheelVelocity ); int getmRightWheelVelocity(); int getmLeftWheelVelocity(); @Override String getXMLString(); @Override int hashCode(); @Override boolean equals(Object obj); static final Movement NO_MOVEMENT; }
@Test public void testGetXMLString() { Movement movement = new Movement(51,50); assertThat(movement.getXMLString()).isEqualTo("<command> <wheel_velocities> <right>51</right> <left>50</left> </wheel_velocities> </command>"); }
ReferencePoint { @Override public String toString() { return "ReferencePoint [mPointName=" + mPointName + ", mDistanceToPoint=" + mDistanceToPoint + ", mAngleToPoint=" + mAngleToPoint + ", mX=" + mX + ", mY=" + mY + "]"; } ReferencePoint( ); @Deprecated ReferencePoint( double aDistanceToPoint, double aAngleToPoint ); ReferencePoint( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint( ReferencePoint aReferencePoint ); @XmlElement(name="id") ReferencePointName getPointName(); @XmlElement(name="dist") double getDistanceToPoint(); void setDistanceToPoint( double aDistance ); @XmlElement(name="angle") double getAngleToPoint(); void setAngleToPoint( double aAngle ); @XmlElement(name="xvalue") double getXOfPoint(); void setXOfPoint( double aXValue ); @XmlElement(name="yvalue") double getYOfPoint(); void setYOfPoint( double aYValue ); ReferencePoint copy(); ReferencePoint set( ReferencePoint aReferencePoint ); ReferencePoint set( double aFirstValue, double aSecondValue, boolean aPolarcoordinates ); ReferencePoint sub( double aScalar ); ReferencePoint sub( ReferencePoint aReferencePoint ); ReferencePoint add( ReferencePoint aReferencePoint ); ReferencePoint multiply( double scalar ); boolean epsilonEquals( ReferencePoint aReferencePoint, double aEpsilon ); boolean epsilonEquals( double aX, double aY, double aEpsilon ); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test public void testToString() { ReferencePoint referencePoint = new ReferencePoint(); referencePoint.setPointName(ReferencePointName.NoFixedName); double distance = 1.41421356; double angle = 45.0; referencePoint.setDistanceToPoint(distance); referencePoint.setAngleToPoint(angle); double x = referencePoint.getDistanceToPoint() * Math.cos(Math.toRadians(referencePoint.getAngleToPoint())); double y = referencePoint.getDistanceToPoint() * Math.sin(Math.toRadians(referencePoint.getAngleToPoint())); String result = referencePoint.toString(); assertThat(result).isEqualTo((String) "ReferencePoint [mPointName=" + ReferencePointName.NoFixedName + ", mDistanceToPoint=" + distance + ", mAngleToPoint=" + angle + ", mX=" + x + ", mY=" + y + "]" ); }
ObjectFactory { public RawWorldData createRawWorldData() { return new RawWorldData(); } RawWorldData createRawWorldData(); }
@Test public void testCreateRawWorldData() { ObjectFactory objectFactory = new ObjectFactory(); assertThat(objectFactory.createRawWorldData()).isInstanceOf(RawWorldData.class); }
InitialConnectionData implements Action { public InitialConnectionData( BotInformation aBot ){ mConnection.type = "Client"; mConnection.protocol_version = 1.0; mConnection.nickname = aBot.getBotname(); mConnection.rc_id = aBot.getRcId(); mConnection.vt_id = aBot.getVtId(); } InitialConnectionData( BotInformation aBot ); @Override String getXMLString(); }
@Test public void testInitialConnectionData() { fail("Not yet implemented"); }
InitialConnectionData implements Action { @Override public String getXMLString() { StringWriter vXMLDataStream = new StringWriter(); JAXB.marshal( mConnection, vXMLDataStream ); String vXMLDataString = vXMLDataStream.toString(); vXMLDataString = vXMLDataString.substring( vXMLDataString.indexOf('>') + 2 ); return vXMLDataString; } InitialConnectionData( BotInformation aBot ); @Override String getXMLString(); }
@Test public void testGetXMLString() { InitialConnectionData initialConnectionData = new InitialConnectionData(botInformationMock); fail("Not yet implemented"); }
NetworkCommunication { public void sendDatagramm( String aData ) throws IOException { mDataPaket.setData( aData.getBytes() ); mToServerSocket.send( mDataPaket ); } NetworkCommunication( InetAddress aServerAddress, int aServerPort ); NetworkCommunication( InetAddress aServerAddress, int aServerPort, int aClientPort); void sendDatagramm( String aData ); String getDatagramm( int aWaitTime ); void closeConnection(); boolean isConnected(); DatagramPacket getDataPaket(); DatagramSocket getToServerSocket(); void setToServerSocket(DatagramSocket mToServerSocket); void setDataPaket(DatagramPacket mDataPaket); String toString(); }
@Test public void testSendDatagramm() { }
CommandLineOptions { static boolean parseCommandLineArguments( String[] aArguments ) { Core.getLogger().trace( "Parsing commandline." ); CommandLineOptions commandLineOptions = new CommandLineOptions(); try { CommandLine commandLine = new CommandLine(commandLineOptions) .registerConverter(BotInformation.Teams.class, new TeamConverter()); commandLine.parse(aArguments); if (!commandLineOptions.reconnect && commandLineOptions.botPort != -1) throw new CommandLine.MissingParameterException(commandLine, "Wenn der Botport gesetzt wurde, muss auch reconnect gesetzt werden!"); commandLineOptions.parseAndShowHelp(); commandLineOptions.setOptions(); return commandLineOptions.remoteStart; } catch (CommandLine.ParameterException e) { Core.getLogger().error(e); CommandLine.usage(commandLineOptions, System.out, CommandLine.Help.Ansi.AUTO); System.exit( 0 ); } catch (UnknownHostException e) { Core.getLogger().error(e); } Core.getInstance().close(); return false; } }
@Test public void testParseCommandLineArgumentsWithNoExceptionsWithRemoteStart() { String[] args = {"-bn","3","-tn","Northern Stars","-t","blau","-ids","13","-s","localhost:3310","-aiarc","../mrbotkiexample/bin/exampleai/brain","-aicl","exampleai.brain.Striker","-aiarg","0","-rs"}; boolean result = CommandLineOptions.parseCommandLineArguments(args); assertThat(result).isTrue(); } @Test public void testParseCommandLineArgumentsWithNoExceptionsWithoutRemoteStart() { String[] args = {"-bn","3","-tn","Northern Stars","-t","blau","-ids","13","-s","localhost:3310","-aiarc","../mrbotkiexample/bin/exampleai/brain","-aicl","exampleai.brain.Striker","-aiarg","0"}; boolean result = CommandLineOptions.parseCommandLineArguments(args); assertThat(result).isFalse(); } @Test public void testParseCommandLineArgumentsWithNoExceptionsWithMissingArgument() { String[] args = {"-bn","3","-tn","Northern Stars","-t","blau","-ids","13","-s","localhost:3310","-aiarc","../mrbotkiexample/bin/exampleai/brain","-aicl","exampleai.brain.Striker","-aiarg","0"}; boolean result = CommandLineOptions.parseCommandLineArguments(args); assertThat(result).isFalse(); }
Movement implements Action { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + mLeftWheelVelocity; result = prime * result + mRightWheelVelocity; return result; } Movement( int aRightWheelVelocity, int aLeftWheelVelocity ); int getmRightWheelVelocity(); int getmLeftWheelVelocity(); @Override String getXMLString(); @Override int hashCode(); @Override boolean equals(Object obj); static final Movement NO_MOVEMENT; }
@Test public void testHashCode() { Movement movement = new Movement(51,50); assertThat(movement.hashCode()).isEqualTo(2562); }
CommandLineOptions { private void setOptions() throws UnknownHostException { BotInformation botInformation = Core.getInstance().getBotinformation(); botInformation.setAIClassname(this.aiClassname); botInformation.setAIArchive(this.aiArchive); botInformation.setAIArgs(Arrays.toString(this.aiArguments)); botInformation.setTeamname(this.teamName); botInformation.setTeam(this.team); botInformation.setBotPort(this.botPort); botInformation.setServerIP(InetAddress.getByName(this.serverPortAndAddress[0])); botInformation.setServerPort(Integer.parseInt(this.serverPortAndAddress[1])); if(this.rcAndVtIdOption.length <= 1) { botInformation.setRcId(rcAndVtIdOption[0]); botInformation.setVtId(rcAndVtIdOption[0]); } else { botInformation.setRcId(rcAndVtIdOption[0]); botInformation.setVtId(rcAndVtIdOption[1]); } botInformation.setBotname(botname); } }
@Test public void testSetOptions() { String[] args = {"-bn","3","-tn","Northern Stars","-t","blau","-ids","13","-s","localhost:3310","-aiarc","../mrbotkiexample/bin/exampleai/brain","-aicl","exampleai.brain.Striker","-aiarg","0"}; CommandLineOptions.parseCommandLineArguments(args); BotInformation botInformation = Core.getInstance().getBotinformation(); assertThat(botInformation.getAIArchive()).isEqualTo("../mrbotkiexample/bin/exampleai/brain"); assertThat(botInformation.getAIArgs()).isEqualTo("[0]"); assertThat(botInformation.getAIClassname()).isEqualTo("exampleai.brain.Striker"); try { assertThat(botInformation.getServerIP()).isEqualTo(InetAddress.getByName("localhost")); } catch (UnknownHostException e) { e.printStackTrace(); } assertThat(botInformation.getServerPort()).isEqualTo(3310); assertThat(botInformation.getRcId()).isEqualTo(13); assertThat(botInformation.getTeam()).isEqualTo(BotInformation.Teams.Blue); assertThat(botInformation.getTeamname()).isEqualTo("Northern Stars"); assertThat(botInformation.getBotname()).isEqualTo("3"); }
TeamConverter implements CommandLine.ITypeConverter<BotInformation.Teams> { @Override public BotInformation.Teams convert(String value) throws Exception { if (value == "gelb" || value == "yellow" || value == "g" || value == "y") return Yellow; else if (value == "blau" || value == "blue" || value == "b") return Blue; else return NotSpecified; } @Override BotInformation.Teams convert(String value); }
@Test public void testConvertWithValueIsGelb() throws Exception { TeamConverter teamConverter = new TeamConverter(); BotInformation.Teams result = teamConverter.convert("gelb"); assertThat(result).isEqualTo(BotInformation.Teams.Yellow); } @Test public void testConvertWithValueIsYellow() throws Exception { TeamConverter teamConverter = new TeamConverter(); BotInformation.Teams result = teamConverter.convert("yellow"); assertThat(result).isEqualTo(BotInformation.Teams.Yellow); } @Test public void testConvertWithValueIsG() throws Exception { TeamConverter teamConverter = new TeamConverter(); BotInformation.Teams result = teamConverter.convert("g"); assertThat(result).isEqualTo(BotInformation.Teams.Yellow); } @Test public void testConvertWithValueIsY() throws Exception { TeamConverter teamConverter = new TeamConverter(); BotInformation.Teams result = teamConverter.convert("y"); assertThat(result).isEqualTo(BotInformation.Teams.Yellow); } @Test public void testConvertWithValueIsBlau() throws Exception { TeamConverter teamConverter = new TeamConverter(); BotInformation.Teams result = teamConverter.convert("blau"); assertThat(result).isEqualTo(BotInformation.Teams.Blue); } @Test public void testConvertWithValueIsBlue() throws Exception { TeamConverter teamConverter = new TeamConverter(); BotInformation.Teams result = teamConverter.convert("blue"); assertThat(result).isEqualTo(BotInformation.Teams.Blue); } @Test public void testConvertWithValueIsB() throws Exception { TeamConverter teamConverter = new TeamConverter(); BotInformation.Teams result = teamConverter.convert("b"); assertThat(result).isEqualTo(BotInformation.Teams.Blue); } @Test public void testConvertWithValueIsSomething() throws Exception { TeamConverter teamConverter = new TeamConverter(); BotInformation.Teams result = teamConverter.convert("something"); assertThat(result).isEqualTo(BotInformation.Teams.NotSpecified); }
Main { public static void main( String[] aCommandline ) { System.setProperty("Bot", ManagementFactory.getRuntimeMXBean().getName() + "" ); Core.getLogger().info("Starting Bot(" + ManagementFactory.getRuntimeMXBean().getName() + ")" ); StringBuilder vParameters = new StringBuilder(); for ( String vParameter: aCommandline) { vParameters.append(vParameter).append(" "); } Core.getLogger().info("Parameters: " + vParameters.toString()); try { Core.getInstance().startBot( aCommandline ); } catch ( Exception e ) { Core.getLogger().fatal( "Fatal error! Bot terminates. ", e ); } } static void main( String[] aCommandline ); }
@Test public void mainWithEmptyCommandline() { String[] vEmptyCommandline = new String[0]; doNothing().when(mCoreMock).startBot(vEmptyCommandline); Main.main(vEmptyCommandline); assertThat(System.getProperty("Bot")).isEqualToIgnoringCase(ManagementFactory.getRuntimeMXBean().getName()); verify(mLoggerMock).info("Starting Bot(" + ManagementFactory.getRuntimeMXBean().getName() + ")" ); verify(mLoggerMock).info("Parameters: "); verify(mCoreMock).startBot(vEmptyCommandline); } @Test public void mainWithACommandline() { String[] vCommandline = new String[5]; vCommandline[0] = "Hello,"; vCommandline[1] = "this"; vCommandline[2] = "is"; vCommandline[3] = "a"; vCommandline[4] = "test."; doNothing().when(mCoreMock).startBot(vCommandline); Main.main(vCommandline); assertThat(System.getProperty("Bot")).isEqualToIgnoringCase(ManagementFactory.getRuntimeMXBean().getName()); verify(mLoggerMock).info("Starting Bot(" + ManagementFactory.getRuntimeMXBean().getName() + ")" ); verify(mLoggerMock).info("Parameters: Hello, this is a test. "); verify(mCoreMock).startBot(vCommandline); } @Test public void mainWithFatalError() { String[] vEmptyCommandline = new String[0]; RuntimeException vTestException = new RuntimeException(); doThrow(vTestException).when(mCoreMock).startBot(vEmptyCommandline); Main.main(vEmptyCommandline); verify(mCoreMock).startBot(vEmptyCommandline); verify(mLoggerMock).fatal( "Fatal error! Bot terminates. ", vTestException ); }
Core { synchronized public BotInformation getBotinformation() { Core.getLogger().debug( "Retriving Botinformation: \n" + mBotinformation.toString() ); return mBotinformation; } Core(); Core( BotInformation aBotInformation ); static Core getInstance(); static synchronized Logger getLogger(); void close(); void startBot( String[] aCommandline ); @SuppressWarnings("resource") boolean initializeAI(); void disposeAI(); synchronized boolean resumeAI(); synchronized void suspendAI(); boolean startServerConnection( int aNumberOfTries ); void stopServerConnection(); void startServermanagements(); void stopServermanagements(); void resumeServermanagements(); void suspendServermanagements(); synchronized BotInformation getBotinformation(); synchronized void setBotinformation( BotInformation aBotinformation ); synchronized NetworkCommunication getServerConnection(); synchronized ArtificialIntelligence getAI(); }
@Test public void testConstructorWithBotInformation() { mSUT = new Core(mBotInformationMock); assertThat(mSUT.getBotinformation()).isEqualTo(mBotInformationMock); }
Core { public static Core getInstance() { if( Core.sINSTANCE == null){ Core.getLogger().trace( "Creating Core-instance." ); Core.sINSTANCE = new Core(); } Core.getLogger().trace( "Retrieving Core-instance." ); return Core.sINSTANCE; } Core(); Core( BotInformation aBotInformation ); static Core getInstance(); static synchronized Logger getLogger(); void close(); void startBot( String[] aCommandline ); @SuppressWarnings("resource") boolean initializeAI(); void disposeAI(); synchronized boolean resumeAI(); synchronized void suspendAI(); boolean startServerConnection( int aNumberOfTries ); void stopServerConnection(); void startServermanagements(); void stopServermanagements(); void resumeServermanagements(); void suspendServermanagements(); synchronized BotInformation getBotinformation(); synchronized void setBotinformation( BotInformation aBotinformation ); synchronized NetworkCommunication getServerConnection(); synchronized ArtificialIntelligence getAI(); }
@Test public void testGetInstance() { mSUT = Core.getInstance(); assertThat(mSUT).isInstanceOf(Core.class); assertThat(mSUT).isEqualTo(Core.getInstance()); assertThat(mSUT.getBotinformation()).isEqualTo(Core.getInstance().getBotinformation()); }
Core { public static synchronized Logger getLogger(){ return sBOTCORELOGGER; } Core(); Core( BotInformation aBotInformation ); static Core getInstance(); static synchronized Logger getLogger(); void close(); void startBot( String[] aCommandline ); @SuppressWarnings("resource") boolean initializeAI(); void disposeAI(); synchronized boolean resumeAI(); synchronized void suspendAI(); boolean startServerConnection( int aNumberOfTries ); void stopServerConnection(); void startServermanagements(); void stopServermanagements(); void resumeServermanagements(); void suspendServermanagements(); synchronized BotInformation getBotinformation(); synchronized void setBotinformation( BotInformation aBotinformation ); synchronized NetworkCommunication getServerConnection(); synchronized ArtificialIntelligence getAI(); }
@Test public void testGetLogger() { Logger vLoggerToTest = Core.getLogger(); assertThat(vLoggerToTest).isInstanceOf(Logger.class); assertThat(vLoggerToTest).isEqualTo(Core.getLogger()); }
FromServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting FromServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "FromServerManagement can not be started again." ); } else { synchronized (this) { mManageMessagesFromServer = true; } super.start(); Core.getLogger().info( "FromServerManagement started." ); } } FromServerManagement(); static FromServerManagement getInstance(); void close(); void resumeManagement(); void suspendManagement(); boolean isSuspended(); @Override void start(); void startManagement(); void stopManagement(); @Override void run(); boolean isReceivingMessages(); }
@Test public void testStartManagementWithoutNetworkConnection() { when(mCoreMock.getServerConnection()).thenReturn( null ); try{ mSUT.startManagement(); fail("Expected Nullpointerexception"); } catch( Exception vExpectedException ) { assertThat(vExpectedException).isInstanceOf(NullPointerException.class); assertThat(vExpectedException.getMessage()).isEqualToIgnoringCase( "NetworkCommunication cannot be NULL when starting FromServerManagement." ); } } @Test public void testStartManagementWithNetworkConnectionAndNotAlive() { when(mCoreMock.getServerConnection()).thenReturn( mNetworkCommunicationMock ); when(mCoreMock.getAI()).thenReturn( null ); mSUT.startManagement(); assertThat(mSUT.isAlive()).isTrue(); verify(mLoggerMock).info("FromServerManagement started."); } @Test public void testStartManagementWithNetworkConnectionAndAlive() { when(mCoreMock.getServerConnection()).thenReturn( mNetworkCommunicationMock ); when(mCoreMock.getAI()).thenReturn( null ); mSUT.startManagement(); try{ mSUT.startManagement(); fail("Expected IllegalThreadStateException"); } catch( Exception vExpectedException ) { assertThat(vExpectedException).isInstanceOf(IllegalThreadStateException.class); assertThat(vExpectedException.getMessage()).isEqualToIgnoringCase( "FromServerManagement can not be started again." ); } } @Test public void testRecieveMessagesWithAI() throws Exception { when(mCoreMock.getServerConnection()).thenReturn( mNetworkCommunicationMock ); when(mCoreMock.getAI()).thenReturn( mArtificialIntelligenceMock ); WorldData vTestData = RawWorldData.createRawWorldDataFromXML("<rawWorldData><time>0</time><agent_id>20</agent_id><nickname>TestBot</nickname><status>found</status></rawWorldData>"); doReturn(((RawWorldData)vTestData).toXMLString()).when(mNetworkCommunicationMock).getDatagramm(1000); mSUT.startManagement(); assertThat(mSUT.isAlive()).isTrue(); await().atMost(2, SECONDS).untilAsserted(()->verify(mArtificialIntelligenceMock, atLeast(1)).putWorldState(vTestData)); } @Test public void testLoseServerConnectionWhileRecievingMessages() throws Exception { when(mCoreMock.getServerConnection()).thenReturn( mNetworkCommunicationMock ); when(mCoreMock.getAI()).thenReturn( mArtificialIntelligenceMock ); doReturn(new RawWorldData().toXMLString()).when(mNetworkCommunicationMock).getDatagramm(1000); mSUT.startManagement(); assertThat(mSUT.isAlive()).isTrue(); when(mCoreMock.getServerConnection()).thenReturn( null ); assertThat(mSUT.isAlive()).isTrue(); await().atMost(2, SECONDS).untilAsserted(()->verify(mLoggerMock, atLeast(1)).debug( "NetworkCommunication cannot be NULL when running FromServerManagement." )); }
FromServerManagement extends Thread { @Override public void start(){ startManagement(); } FromServerManagement(); static FromServerManagement getInstance(); void close(); void resumeManagement(); void suspendManagement(); boolean isSuspended(); @Override void start(); void startManagement(); void stopManagement(); @Override void run(); boolean isReceivingMessages(); }
@Test public void testStartWithoutNetworkConnection() { when(mCoreMock.getServerConnection()).thenReturn( null ); try{ mSUT.start(); fail("Expected Nullpointerexception"); } catch( Exception vExpectedException ) { assertThat(vExpectedException).isInstanceOf(NullPointerException.class); assertThat(vExpectedException.getMessage()).isEqualToIgnoringCase( "NetworkCommunication cannot be NULL when starting FromServerManagement." ); } } @Test public void testStartWithNetworkConnectionAndNotAlive() { when(mCoreMock.getServerConnection()).thenReturn( mNetworkCommunicationMock ); when(mCoreMock.getAI()).thenReturn( null ); mSUT.start(); assertThat(mSUT.isAlive()).isTrue(); verify(mLoggerMock).info("FromServerManagement started."); }
FromServerManagement extends Thread { public static FromServerManagement getInstance() { if( FromServerManagement.sINSTANCE == null){ FromServerManagement.sINSTANCE = new FromServerManagement(); } return FromServerManagement.sINSTANCE; } FromServerManagement(); static FromServerManagement getInstance(); void close(); void resumeManagement(); void suspendManagement(); boolean isSuspended(); @Override void start(); void startManagement(); void stopManagement(); @Override void run(); boolean isReceivingMessages(); }
@Test public void testGetInstance() { FromServerManagement vSaveToCompare = FromServerManagement.getInstance(); assertThat(vSaveToCompare).isInstanceOf(FromServerManagement.class); assertThat(vSaveToCompare).isEqualTo(FromServerManagement.getInstance()); }
FromServerManagement extends Thread { public void stopManagement(){ synchronized (this) { mManageMessagesFromServer = false; } if( isAlive()){ mSuspended = false; while(isAlive()){ try { Thread.sleep( 10 ); } catch ( Exception vException ) { Core.getLogger().error( "Error stopping FromServerManagement.", vException ); } } Core.getLogger().info( "FromServerManagement stopped." ); } } FromServerManagement(); static FromServerManagement getInstance(); void close(); void resumeManagement(); void suspendManagement(); boolean isSuspended(); @Override void start(); void startManagement(); void stopManagement(); @Override void run(); boolean isReceivingMessages(); }
@Test public void testStopManagementWhenNotAlive() { assertThat(mSUT.isAlive()).isFalse(); mSUT.stopManagement(); assertThat(mSUT.isAlive()).isFalse(); verify(mLoggerMock, never()).info("FromServerManagement stopped."); }
FromServerManagement extends Thread { public boolean isReceivingMessages(){ return isAlive() && (System.currentTimeMillis() - mLastReceivedMessage.get()) < 100; } FromServerManagement(); static FromServerManagement getInstance(); void close(); void resumeManagement(); void suspendManagement(); boolean isSuspended(); @Override void start(); void startManagement(); void stopManagement(); @Override void run(); boolean isReceivingMessages(); }
@Test public void testIsReceivingMessagesWhenNotAlive() { assertThat(mSUT.isAlive()).isFalse(); assertThat(mSUT.isReceivingMessages()).isFalse(); }
ReloadAiManagement extends Thread { public void startManagement(){ if( !isAlive() ){ mAiActive = true; super.start(); Core.getLogger().info( "RestartAiServerManagement started." ); } } ReloadAiManagement(); static ReloadAiManagement getInstance(); void close(); @Override void start(); void startManagement(); void stopManagement(); @Override void run(); }
@Test public void testStartManagementWhileNotAlive() { when(mCoreMock.getAI()).thenReturn( null ); assertThat(mSUT.isAlive()).isFalse(); mSUT.startManagement(); assertThat(mSUT.isAlive()).isTrue(); verify(mLoggerMock).info("RestartAiServerManagement started."); } @Test public void testStartManagementWhileAlive() { when(mCoreMock.getAI()).thenReturn( null ); mSUT.startManagement(); assertThat(mSUT.isAlive()).isTrue(); mSUT.startManagement(); assertThat(mSUT.isAlive()).isTrue(); verify(mLoggerMock, times(1)).info("RestartAiServerManagement started."); } @Test public void testRunWithoutAI() throws Exception { when(mCoreMock.getAI()).thenReturn( null ); mSUT.startManagement(); assertThat(mSUT.isAlive()).isTrue(); } @Test public void testRunWithAIAndNoNeedToRestart() throws Exception { when(mCoreMock.getAI()).thenReturn( mArtificialIntelligenceMock ); when(mArtificialIntelligenceMock.wantRestart()).thenReturn(false); mSUT.startManagement(); assertThat(mSUT.isAlive()).isTrue(); await().atMost(2, SECONDS).untilAsserted(()->verify(mArtificialIntelligenceMock, atLeast(2)).wantRestart()); verify(mCoreMock, never()).initializeAI(); verify(mCoreMock, never()).resumeAI(); } @Test public void testRunWithAIAndNeedToRestart() throws Exception { when(mCoreMock.getAI()).thenReturn( mArtificialIntelligenceMock ); when(mArtificialIntelligenceMock.wantRestart()).thenReturn(true).thenReturn(false); mSUT.startManagement(); assertThat(mSUT.isAlive()).isTrue(); await().atMost(2, SECONDS).untilAsserted(()->verify(mArtificialIntelligenceMock, atLeast(2)).wantRestart()); InOrder inOrder = inOrder(mCoreMock); inOrder.verify(mCoreMock).initializeAI(); inOrder.verify(mCoreMock).resumeAI(); }
ReloadAiManagement extends Thread { @Override public void start(){ startManagement(); } ReloadAiManagement(); static ReloadAiManagement getInstance(); void close(); @Override void start(); void startManagement(); void stopManagement(); @Override void run(); }
@Test public void testStartWhileNotAlive() { when(mCoreMock.getAI()).thenReturn( null ); assertThat(mSUT.isAlive()).isFalse(); mSUT.start(); assertThat(mSUT.isAlive()).isTrue(); verify(mLoggerMock).info("RestartAiServerManagement started."); } @Test public void testStartWhileAlive() { when(mCoreMock.getAI()).thenReturn( null ); mSUT.start(); assertThat(mSUT.isAlive()).isTrue(); mSUT.start(); assertThat(mSUT.isAlive()).isTrue(); verify(mLoggerMock, times(1)).info("RestartAiServerManagement started."); }
ReloadAiManagement extends Thread { public static ReloadAiManagement getInstance() { if( ReloadAiManagement.sINSTANCE == null){ ReloadAiManagement.sINSTANCE = new ReloadAiManagement(); } return ReloadAiManagement.sINSTANCE; } ReloadAiManagement(); static ReloadAiManagement getInstance(); void close(); @Override void start(); void startManagement(); void stopManagement(); @Override void run(); }
@Test public void testGetInstance() { ReloadAiManagement vSaveToCompare = ReloadAiManagement.getInstance(); assertThat(vSaveToCompare).isInstanceOf(ReloadAiManagement.class); assertThat(vSaveToCompare).isEqualTo(ReloadAiManagement.getInstance()); }
ReloadAiManagement extends Thread { public void stopManagement(){ mAiActive = false; if( isAlive()){ Core.getLogger().info( "RestartAiServerManagement stopping." ); while(isAlive()){ try { Thread.sleep( 10 ); } catch ( Exception vException ) { Core.getLogger().error( "Error stopping RestartAiServerManagement.", vException ); } } Core.getLogger().info( "RestartAiServerManagement stopped." ); } } ReloadAiManagement(); static ReloadAiManagement getInstance(); void close(); @Override void start(); void startManagement(); void stopManagement(); @Override void run(); }
@Test public void testStopManagementWhenNotAlive() { when(mCoreMock.getAI()).thenReturn( null ); assertThat(mSUT.isAlive()).isFalse(); mSUT.stopManagement(); assertThat(mSUT.isAlive()).isFalse(); verify(mLoggerMock, never()).info("RestartAiServerManagement stopped."); }
ReloadAiManagement extends Thread { @Override public void run(){ while( mAiActive ){ try { if(Core.getInstance().getAI() != null && Core.getInstance().getAI().wantRestart()){ Core.getInstance().initializeAI(); Core.getInstance().resumeAI(); Thread.sleep( 500 ); } Thread.sleep( 50 ); } catch ( Exception vException ) { Core.getLogger().error( "Error while waiting in RestartAiServerManagement.", vException ); } } } ReloadAiManagement(); static ReloadAiManagement getInstance(); void close(); @Override void start(); void startManagement(); void stopManagement(); @Override void run(); }
@Test public void testRunWithoutStart() throws Exception { when(mCoreMock.getAI()).thenReturn( mArtificialIntelligenceMock ); assertThat(mSUT.isAlive()).isFalse(); mSUT.run(); assertThat(mSUT.isAlive()).isFalse(); verifyZeroInteractions(mArtificialIntelligenceMock); }
ToServerManagement extends Thread { @Override public void start(){ this.startManagement(); } ToServerManagement(); static ToServerManagement getInstance(); void close(); void resumeManagement(); boolean isSuspended(); void suspendManagement(); @Override void start(); void startManagement(); void stopManagement(); @Override void run(); boolean isSendingMessages(); }
@Test public void testStartWithoutNetworkConnection() { when(mCoreMock.getServerConnection()).thenReturn( null ); try{ mSUT.start(); fail("Expected Nullpointerexception"); } catch( Exception vExpectedException ) { assertThat(vExpectedException).isInstanceOf(NullPointerException.class); assertThat(vExpectedException.getMessage()).isEqualToIgnoringCase( "NetworkCommunication cannot be NULL when starting ToServerManagement." ); } } @Test public void testStartWithNetworkConnectionAndNotAlive() { when(mCoreMock.getServerConnection()).thenReturn( mNetworkCommunicationMock ); when(mCoreMock.getAI()).thenReturn( null ); mSUT.start(); assertThat(mSUT.isAlive()).isTrue(); verify(mLoggerMock).info("ToServerManagement started."); }
WebConfigurer implements ServletContextInitializer, EmbeddedServletContainerCustomizer { @Override public void customize(ConfigurableEmbeddedServletContainer container) { MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT); mappings.add("html", "text/html;charset=utf-8"); mappings.add("json", "text/html;charset=utf-8"); container.setMimeMappings(mappings); setLocationForStaticAssets(container); if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) && container instanceof UndertowEmbeddedServletContainerFactory) { ((UndertowEmbeddedServletContainerFactory) container) .addBuilderCustomizers(builder -> builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true)); } } WebConfigurer(Environment env, JHipsterProperties jHipsterProperties, HazelcastInstance hazelcastInstance); @Override void onStartup(ServletContext servletContext); @Override void customize(ConfigurableEmbeddedServletContainer container); @Bean CorsFilter corsFilter(); @Autowired(required = false) void setMetricRegistry(MetricRegistry metricRegistry); }
@Test public void testUndertowHttp2Enabled() { props.getHttp().setVersion(JHipsterProperties.Http.Version.V_2_0); UndertowEmbeddedServletContainerFactory container = new UndertowEmbeddedServletContainerFactory(); webConfigurer.customize(container); Builder builder = Undertow.builder(); container.getBuilderCustomizers().forEach(c -> c.customize(builder)); OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isTrue(); } @Test public void testCustomizeServletContainer() { env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); UndertowEmbeddedServletContainerFactory container = new UndertowEmbeddedServletContainerFactory(); webConfigurer.customize(container); assertThat(container.getMimeMappings().get("abs")).isEqualTo("audio/x-mpeg"); assertThat(container.getMimeMappings().get("html")).isEqualTo("text/html;charset=utf-8"); assertThat(container.getMimeMappings().get("json")).isEqualTo("text/html;charset=utf-8"); if (container.getDocumentRoot() != null) { assertThat(container.getDocumentRoot().getPath()).isEqualTo(FilenameUtils.separatorsToSystem("target/www")); } Builder builder = Undertow.builder(); container.getBuilderCustomizers().forEach(c -> c.customize(builder)); OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isNull(); } @Test public void testCustomizeServletContainer() { env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); UndertowEmbeddedServletContainerFactory container = new UndertowEmbeddedServletContainerFactory(); webConfigurer.customize(container); assertThat(container.getMimeMappings().get("abs")).isEqualTo("audio/x-mpeg"); assertThat(container.getMimeMappings().get("html")).isEqualTo("text/html;charset=utf-8"); assertThat(container.getMimeMappings().get("json")).isEqualTo("text/html;charset=utf-8"); if (container.getDocumentRoot() != null) { assertThat(container.getDocumentRoot().getPath()).isEqualTo("target/www"); } Builder builder = Undertow.builder(); container.getBuilderCustomizers().forEach(c -> c.customize(builder)); OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isNull(); }
WebConfigurer implements ServletContextInitializer, EmbeddedServletContainerCustomizer { @Bean public CorsFilter corsFilter() { UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); CorsConfiguration config = jHipsterProperties.getCors(); if (config.getAllowedOrigins() != null && !config.getAllowedOrigins().isEmpty()) { log.debug("Registering CORS filter"); source.registerCorsConfiguration("/apiapi/**", config); } return new CorsFilter(source); } WebConfigurer(Environment env, JHipsterProperties jHipsterProperties, HazelcastInstance hazelcastInstance); @Override void onStartup(ServletContext servletContext); @Override void customize(ConfigurableEmbeddedServletContainer container); @Bean CorsFilter corsFilter(); @Autowired(required = false) void setMetricRegistry(MetricRegistry metricRegistry); }
@Test public void testCorsFilterOnApiPath() throws Exception { props.getCors().setAllowedOrigins(Collections.singletonList("*")); props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); props.getCors().setAllowedHeaders(Collections.singletonList("*")); props.getCors().setMaxAge(1800L); props.getCors().setAllowCredentials(true); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) .addFilters(webConfigurer.corsFilter()) .build(); mockMvc.perform( options("/api/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com") .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "POST")) .andExpect(status().isOk()) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")) .andExpect(header().string(HttpHeaders.VARY, "Origin")) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET,POST,PUT,DELETE")) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true")) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_MAX_AGE, "1800")); mockMvc.perform( get("/api/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com")) .andExpect(status().isOk()) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")); } @Test public void testCorsFilterOnOtherPath() throws Exception { props.getCors().setAllowedOrigins(Collections.singletonList("*")); props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); props.getCors().setAllowedHeaders(Collections.singletonList("*")); props.getCors().setMaxAge(1800L); props.getCors().setAllowCredentials(true); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) .addFilters(webConfigurer.corsFilter()) .build(); mockMvc.perform( get("/test/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com")) .andExpect(status().isOk()) .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); } @Test public void testCorsFilterDeactivated() throws Exception { props.getCors().setAllowedOrigins(null); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) .addFilters(webConfigurer.corsFilter()) .build(); mockMvc.perform( get("/api/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com")) .andExpect(status().isOk()) .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); } @Test public void testCorsFilterDeactivated2() throws Exception { props.getCors().setAllowedOrigins(new ArrayList<>()); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) .addFilters(webConfigurer.corsFilter()) .build(); mockMvc.perform( get("/api/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com")) .andExpect(status().isOk()) .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); }
ProfileInfoResource { @GetMapping("/profile-info") public ProfileInfoVM getActiveProfiles() { String[] activeProfiles = DefaultProfileUtil.getActiveProfiles(env); return new ProfileInfoVM(activeProfiles, getRibbonEnv(activeProfiles)); } ProfileInfoResource(Environment env, JHipsterProperties jHipsterProperties); @GetMapping("/profile-info") ProfileInfoVM getActiveProfiles(); }
@Test public void getActiveProfilesTest() throws Exception { MvcResult res = mock.perform(get("/api/profile-info") .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) .andReturn(); assertTrue(res.getResponse().getContentAsString().contains("\"activeProfiles\":[\""+profiles[0]+"\"]")); }
TokenProvider { public boolean validateToken(String authToken) { try { Jwts.parser().setSigningKey(secretKey).parseClaimsJws(authToken); return true; } catch (SignatureException e) { log.info("Invalid JWT signature."); log.trace("Invalid JWT signature trace: {}", e); } catch (MalformedJwtException e) { log.info("Invalid JWT token."); log.trace("Invalid JWT token trace: {}", e); } catch (ExpiredJwtException e) { log.info("Expired JWT token."); log.trace("Expired JWT token trace: {}", e); } catch (UnsupportedJwtException e) { log.info("Unsupported JWT token."); log.trace("Unsupported JWT token trace: {}", e); } catch (IllegalArgumentException e) { log.info("JWT token compact of handler are invalid."); log.trace("JWT token compact of handler are invalid trace: {}", e); } return false; } TokenProvider(JHipsterProperties jHipsterProperties); @PostConstruct void init(); String createToken(Authentication authentication, Boolean rememberMe); Authentication getAuthentication(String token); boolean validateToken(String authToken); }
@Test public void testReturnFalseWhenJWTisUnsupported() { String unsupportedToken = createUnsupportedToken(); boolean isTokenValid = tokenProvider.validateToken(unsupportedToken); assertThat(isTokenValid).isEqualTo(false); }
LogsResource { @GetMapping("/logs") @Timed public List<LoggerVM> getList() { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); return context.getLoggerList() .stream() .map(LoggerVM::new) .collect(Collectors.toList()); } @GetMapping("/logs") @Timed List<LoggerVM> getList(); @PutMapping("/logs") @ResponseStatus(HttpStatus.NO_CONTENT) @Timed void changeLevel(@RequestBody LoggerVM jsonLogger); }
@Test public void getListTest() throws Exception { mock.perform(get("/management/logs") .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)); }
LogsResource { @PutMapping("/logs") @ResponseStatus(HttpStatus.NO_CONTENT) @Timed public void changeLevel(@RequestBody LoggerVM jsonLogger) { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); context.getLogger(jsonLogger.getName()).setLevel(Level.valueOf(jsonLogger.getLevel())); } @GetMapping("/logs") @Timed List<LoggerVM> getList(); @PutMapping("/logs") @ResponseStatus(HttpStatus.NO_CONTENT) @Timed void changeLevel(@RequestBody LoggerVM jsonLogger); }
@Test public void changeLevelTest() throws Exception { LoggerVM logger = new LoggerVM(); logger.setLevel("ERROR"); logger.setName("ROOT"); mock.perform(put("/management/logs") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(new ObjectMapper().writeValueAsString(logger))) .andExpect(status().isNoContent()); MvcResult res = mock.perform(get("/management/logs") .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) .andReturn(); assertTrue(res.getResponse().getContentAsString().contains("\"name\":\""+logger.getName() +"\",\"level\":\""+logger.getLevel()+"\"")); }
SshResource { @GetMapping(value = "/ssh/public_key", produces = MediaType.TEXT_PLAIN_VALUE) @Timed public ResponseEntity<String> eureka() { try { String publicKey = getPublicKey(); if(publicKey != null) return new ResponseEntity<>(publicKey, HttpStatus.OK); } catch (IOException e) { log.warn("SSH public key could not be loaded: {}", e.getMessage()); } return new ResponseEntity<>(HttpStatus.NOT_FOUND); } @GetMapping(value = "/ssh/public_key", produces = MediaType.TEXT_PLAIN_VALUE) @Timed ResponseEntity<String> eureka(); }
@Test public void eurekaTest() throws Exception { Mockito.doReturn(null).when(ssh).getPublicKey(); mock.perform(get("/api/ssh/public_key")) .andExpect(status().isNotFound()); Mockito.doReturn("key").when(ssh).getPublicKey(); mock.perform(get("/api/ssh/public_key")) .andExpect(content().contentTypeCompatibleWith(MediaType.TEXT_PLAIN)) .andExpect(content().string("key")) .andExpect(status().isOk()); }
UserJWTController { @PostMapping("/authenticate") @Timed public ResponseEntity authorize(@Valid @RequestBody LoginVM loginVM, HttpServletResponse response) { UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginVM.getUsername(), loginVM.getPassword()); try { Authentication authentication = this.authenticationManager.authenticate(authenticationToken); SecurityContextHolder.getContext().setAuthentication(authentication); boolean rememberMe = (loginVM.isRememberMe() == null) ? false : loginVM.isRememberMe(); String jwt = tokenProvider.createToken(authentication, rememberMe); response.addHeader(JWTConfigurer.AUTHORIZATION_HEADER, "Bearer " + jwt); return ResponseEntity.ok(new JWTToken(jwt)); } catch (AuthenticationException ae) { log.trace("Authentication exception trace: {}", ae); return new ResponseEntity<>(Collections.singletonMap("AuthenticationException", ae.getLocalizedMessage()), HttpStatus.UNAUTHORIZED); } } UserJWTController(TokenProvider tokenProvider, AuthenticationManager authenticationManager); @PostMapping("/authenticate") @Timed ResponseEntity authorize(@Valid @RequestBody LoginVM loginVM, HttpServletResponse response); }
@Test public void authorizeTest() throws Exception { LoginVM vm = new LoginVM(); vm.setUsername("admin"); vm.setPassword("admin"); vm.setRememberMe(true); Mockito.doReturn("fakeToken").when(tokenProvider) .createToken(Mockito.any(Authentication.class), Mockito.anyBoolean()); mock.perform(post("/api/authenticate") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN, MediaType.ALL) .content(new ObjectMapper().writeValueAsString(vm))) .andExpect(content().string("{\"id_token\":\"fakeToken\"}")) .andExpect(status().isOk()); Mockito.doThrow(new AuthenticationException(null){}).when(tokenProvider) .createToken(Mockito.any(Authentication.class), Mockito.anyBoolean()); MvcResult res = mock.perform(post("/api/authenticate") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN, MediaType.ALL) .content("{\"username\":\"fakeUsername\",\"password\":\"fakePassword\",\"rememberMe\":false}")) .andExpect(status().isUnauthorized()) .andReturn(); assertTrue(res.getResponse().getContentAsString().startsWith("{\"AuthenticationException\"")); vm.setUsername("badcred"); vm.setPassword("badcred"); Mockito.doThrow(new BadCredentialsException("Bad credentials")).when(authenticationManager) .authenticate(new UsernamePasswordAuthenticationToken(vm.getUsername(), vm.getPassword())); mock.perform(post("/api/authenticate") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN, MediaType.ALL) .content(new ObjectMapper().writeValueAsString(vm))) .andExpect(status().isUnauthorized()) .andExpect(content().string("{\"AuthenticationException\":\"Bad credentials\"}")); }
ExceptionTranslator { @ExceptionHandler(MethodArgumentNotValidException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody public ErrorVM processValidationError(MethodArgumentNotValidException ex) { BindingResult result = ex.getBindingResult(); List<FieldError> fieldErrors = result.getFieldErrors(); ErrorVM dto = new ErrorVM(ErrorConstants.ERR_VALIDATION); for (FieldError fieldError : fieldErrors) { dto.add(fieldError.getObjectName(), fieldError.getField(), fieldError.getCode()); } return dto; } @ExceptionHandler(MethodArgumentNotValidException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody ErrorVM processValidationError(MethodArgumentNotValidException ex); @ExceptionHandler(CustomParameterizedException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody ParameterizedErrorVM processParameterizedValidationError(CustomParameterizedException ex); @ExceptionHandler(AccessDeniedException.class) @ResponseStatus(HttpStatus.FORBIDDEN) @ResponseBody ErrorVM processAccessDeniedException(AccessDeniedException e); @ExceptionHandler(HttpRequestMethodNotSupportedException.class) @ResponseBody @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) ErrorVM processMethodNotSupportedException(HttpRequestMethodNotSupportedException exception); @ExceptionHandler(Exception.class) ResponseEntity<ErrorVM> processRuntimeException(Exception ex); }
@Test public void processValidationErrorTest() throws Exception { UserJWTController control = new UserJWTController(null, null); MockMvc jwtMock = MockMvcBuilders.standaloneSetup(control) .setControllerAdvice(new ExceptionTranslator()) .build(); MvcResult res = jwtMock.perform(post("/api/authenticate") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN, MediaType.ALL) .content("{\"username\":\"fakeUsernameTooLongfakeUsernameTooLongfakeUsernameTooLongfakeUsernameTooLong" + "\",\"password\":\"fakePassword\",\"rememberMe\":false}")) .andExpect(status().isBadRequest()) .andReturn(); assertThat(res.getResolvedException(), instanceOf(MethodArgumentNotValidException.class)); }
ExceptionTranslator { @ExceptionHandler(CustomParameterizedException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody public ParameterizedErrorVM processParameterizedValidationError(CustomParameterizedException ex) { return ex.getErrorVM(); } @ExceptionHandler(MethodArgumentNotValidException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody ErrorVM processValidationError(MethodArgumentNotValidException ex); @ExceptionHandler(CustomParameterizedException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody ParameterizedErrorVM processParameterizedValidationError(CustomParameterizedException ex); @ExceptionHandler(AccessDeniedException.class) @ResponseStatus(HttpStatus.FORBIDDEN) @ResponseBody ErrorVM processAccessDeniedException(AccessDeniedException e); @ExceptionHandler(HttpRequestMethodNotSupportedException.class) @ResponseBody @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) ErrorVM processMethodNotSupportedException(HttpRequestMethodNotSupportedException exception); @ExceptionHandler(Exception.class) ResponseEntity<ErrorVM> processRuntimeException(Exception ex); }
@Test public void processParameterizedValidationErrorTest() throws Exception { SecurityContext securityContext = Mockito.mock(SecurityContext.class); Mockito.when(securityContext.getAuthentication()).thenThrow(new CustomParameterizedException(null)); SecurityContextHolder.setContext(securityContext); MvcResult res = mock.perform(get("/api/account")) .andExpect(status().isBadRequest()) .andReturn(); assertThat(res.getResolvedException(), instanceOf(CustomParameterizedException.class)); }
ExceptionTranslator { @ExceptionHandler(AccessDeniedException.class) @ResponseStatus(HttpStatus.FORBIDDEN) @ResponseBody public ErrorVM processAccessDeniedException(AccessDeniedException e) { return new ErrorVM(ErrorConstants.ERR_ACCESS_DENIED, e.getMessage()); } @ExceptionHandler(MethodArgumentNotValidException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody ErrorVM processValidationError(MethodArgumentNotValidException ex); @ExceptionHandler(CustomParameterizedException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody ParameterizedErrorVM processParameterizedValidationError(CustomParameterizedException ex); @ExceptionHandler(AccessDeniedException.class) @ResponseStatus(HttpStatus.FORBIDDEN) @ResponseBody ErrorVM processAccessDeniedException(AccessDeniedException e); @ExceptionHandler(HttpRequestMethodNotSupportedException.class) @ResponseBody @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) ErrorVM processMethodNotSupportedException(HttpRequestMethodNotSupportedException exception); @ExceptionHandler(Exception.class) ResponseEntity<ErrorVM> processRuntimeException(Exception ex); }
@Test public void processAccessDeniedExceptionTest() throws Exception { SecurityContext securityContext = Mockito.mock(SecurityContext.class); Mockito.when(securityContext.getAuthentication()).thenThrow(new AccessDeniedException(null)); SecurityContextHolder.setContext(securityContext); MvcResult res = mock.perform(get("/api/account")) .andExpect(status().isForbidden()) .andReturn(); assertThat(res.getResolvedException(), instanceOf(AccessDeniedException.class)); }
ExceptionTranslator { @ExceptionHandler(HttpRequestMethodNotSupportedException.class) @ResponseBody @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) public ErrorVM processMethodNotSupportedException(HttpRequestMethodNotSupportedException exception) { return new ErrorVM(ErrorConstants.ERR_METHOD_NOT_SUPPORTED, exception.getMessage()); } @ExceptionHandler(MethodArgumentNotValidException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody ErrorVM processValidationError(MethodArgumentNotValidException ex); @ExceptionHandler(CustomParameterizedException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody ParameterizedErrorVM processParameterizedValidationError(CustomParameterizedException ex); @ExceptionHandler(AccessDeniedException.class) @ResponseStatus(HttpStatus.FORBIDDEN) @ResponseBody ErrorVM processAccessDeniedException(AccessDeniedException e); @ExceptionHandler(HttpRequestMethodNotSupportedException.class) @ResponseBody @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) ErrorVM processMethodNotSupportedException(HttpRequestMethodNotSupportedException exception); @ExceptionHandler(Exception.class) ResponseEntity<ErrorVM> processRuntimeException(Exception ex); }
@Test public void processMethodNotSupportedExceptionTest() throws Exception { MvcResult res = mock.perform(post("/api/account") .content("{\"testFakeParam\"}")) .andExpect(status().isMethodNotAllowed()) .andReturn(); assertThat(res.getResolvedException(), instanceOf(HttpRequestMethodNotSupportedException.class)); }
ExceptionTranslator { @ExceptionHandler(Exception.class) public ResponseEntity<ErrorVM> processRuntimeException(Exception ex) { BodyBuilder builder; ErrorVM errorVM; ResponseStatus responseStatus = AnnotationUtils.findAnnotation(ex.getClass(), ResponseStatus.class); if (responseStatus != null) { builder = ResponseEntity.status(responseStatus.value()); errorVM = new ErrorVM("error." + responseStatus.value().value(), responseStatus.reason()); } else { builder = ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR); errorVM = new ErrorVM(ErrorConstants.ERR_INTERNAL_SERVER_ERROR, "Internal server error"); } return builder.body(errorVM); } @ExceptionHandler(MethodArgumentNotValidException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody ErrorVM processValidationError(MethodArgumentNotValidException ex); @ExceptionHandler(CustomParameterizedException.class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody ParameterizedErrorVM processParameterizedValidationError(CustomParameterizedException ex); @ExceptionHandler(AccessDeniedException.class) @ResponseStatus(HttpStatus.FORBIDDEN) @ResponseBody ErrorVM processAccessDeniedException(AccessDeniedException e); @ExceptionHandler(HttpRequestMethodNotSupportedException.class) @ResponseBody @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) ErrorVM processMethodNotSupportedException(HttpRequestMethodNotSupportedException exception); @ExceptionHandler(Exception.class) ResponseEntity<ErrorVM> processRuntimeException(Exception ex); }
@Test public void processRuntimeExceptionTest() throws Exception { SecurityContext securityContext = Mockito.mock(SecurityContext.class); Mockito.when(securityContext.getAuthentication()).thenThrow(new RuntimeException()); SecurityContextHolder.setContext(securityContext); MvcResult res = mock.perform(get("/api/account")) .andExpect(status().isInternalServerError()) .andReturn(); assertThat(res.getResolvedException(), instanceOf(RuntimeException.class)); }
CustomParameterizedException extends RuntimeException { public ParameterizedErrorVM getErrorVM() { return new ParameterizedErrorVM(message, paramMap); } CustomParameterizedException(String message, String... params); CustomParameterizedException(String message, Map<String, String> paramMap); ParameterizedErrorVM getErrorVM(); }
@Test public void getErrorVMTest() throws Exception { CustomParameterizedException exc = new CustomParameterizedException("Test"); try { throw exc; } catch ( Exception exception ) { assertTrue(exception instanceof CustomParameterizedException); CustomParameterizedException exceptionCast = (CustomParameterizedException) exception; assertNotNull(exceptionCast.getErrorVM()); assertNotNull(exceptionCast.getErrorVM().getMessage()); assertEquals("Test", exceptionCast.getErrorVM().getMessage()); } exc = new CustomParameterizedException(null); try { throw exc; } catch ( Exception exception ) { assertTrue(exception instanceof CustomParameterizedException); CustomParameterizedException exceptionCast = (CustomParameterizedException) exception; assertNotNull(exceptionCast.getErrorVM()); assertNull(exceptionCast.getErrorVM().getMessage()); } }
FieldErrorVM implements Serializable { public String getObjectName() { return objectName; } FieldErrorVM(String dto, String field, String message); String getObjectName(); String getField(); String getMessage(); }
@Test public void getObjectNameTest() throws Exception { FieldErrorVM vm = new FieldErrorVM(null, null, null); assertNull(vm.getObjectName()); vm = new FieldErrorVM("dto", "field", "message"); assertEquals("dto", vm.getObjectName()); }
FieldErrorVM implements Serializable { public String getField() { return field; } FieldErrorVM(String dto, String field, String message); String getObjectName(); String getField(); String getMessage(); }
@Test public void getFieldTest() throws Exception { FieldErrorVM vm = new FieldErrorVM(null, null, null); assertNull(vm.getField()); vm = new FieldErrorVM("dto", "field", "message"); assertEquals("field", vm.getField()); }
FieldErrorVM implements Serializable { public String getMessage() { return message; } FieldErrorVM(String dto, String field, String message); String getObjectName(); String getField(); String getMessage(); }
@Test public void getMessageTest() throws Exception { FieldErrorVM vm = new FieldErrorVM(null, null, null); assertNull(vm.getMessage()); vm = new FieldErrorVM("dto", "field", "message"); assertEquals("message", vm.getMessage()); }
ErrorVM implements Serializable { public void add(String objectName, String field, String message) { if (fieldErrors == null) { fieldErrors = new ArrayList<>(); } fieldErrors.add(new FieldErrorVM(objectName, field, message)); } ErrorVM(String message); ErrorVM(String message, String description); ErrorVM(String message, String description, List<FieldErrorVM> fieldErrors); void add(String objectName, String field, String message); String getMessage(); String getDescription(); List<FieldErrorVM> getFieldErrors(); }
@Test public void addTest() throws Exception { assertNull(vm1.getFieldErrors()); assertNull(vm2.getFieldErrors()); assertNotNull(vm3.getFieldErrors()); assertNull(vm1null.getFieldErrors()); assertNull(vm2null.getFieldErrors()); assertNull(vm3null.getFieldErrors()); vm1.add("testObjectName", "testField", "testMsg"); vm2.add("testObjectName", "testField", "testMsg"); vm3.add("testObjectName", "testField", "testMsg"); vm1null.add("testObjectName", "testField", "testMsg"); vm2null.add("testObjectName", "testField", "testMsg"); vm3null.add("testObjectName", "testField", "testMsg"); assertNotNull(vm1.getFieldErrors()); assertFalse(vm1.getFieldErrors().isEmpty()); assertNotNull(vm2.getFieldErrors()); assertFalse(vm2.getFieldErrors().isEmpty()); assertNotNull(vm3.getFieldErrors()); assertFalse(vm3.getFieldErrors().isEmpty()); assertNotNull(vm1null.getFieldErrors()); assertFalse(vm1null.getFieldErrors().isEmpty()); assertNotNull(vm2null.getFieldErrors()); assertFalse(vm2null.getFieldErrors().isEmpty()); assertNotNull(vm3null.getFieldErrors()); assertFalse(vm3null.getFieldErrors().isEmpty()); }
ErrorVM implements Serializable { public String getMessage() { return message; } ErrorVM(String message); ErrorVM(String message, String description); ErrorVM(String message, String description, List<FieldErrorVM> fieldErrors); void add(String objectName, String field, String message); String getMessage(); String getDescription(); List<FieldErrorVM> getFieldErrors(); }
@Test public void getMessageTest() throws Exception { assertEquals(message, vm1.getMessage()); assertEquals(message, vm2.getMessage()); assertEquals(message, vm3.getMessage()); assertNull(vm1null.getMessage()); assertNull(vm2null.getMessage()); assertNull(vm3null.getMessage()); }
ErrorVM implements Serializable { public String getDescription() { return description; } ErrorVM(String message); ErrorVM(String message, String description); ErrorVM(String message, String description, List<FieldErrorVM> fieldErrors); void add(String objectName, String field, String message); String getMessage(); String getDescription(); List<FieldErrorVM> getFieldErrors(); }
@Test public void getDescriptionTest() throws Exception { assertNull(vm1.getDescription()); assertEquals(description, vm2.getDescription()); assertEquals(description, vm3.getDescription()); assertNull(vm1null.getDescription()); assertNull(vm2null.getDescription()); assertNull(vm3null.getDescription()); }
ErrorVM implements Serializable { public List<FieldErrorVM> getFieldErrors() { return fieldErrors; } ErrorVM(String message); ErrorVM(String message, String description); ErrorVM(String message, String description, List<FieldErrorVM> fieldErrors); void add(String objectName, String field, String message); String getMessage(); String getDescription(); List<FieldErrorVM> getFieldErrors(); }
@Test public void getFieldErrorsTest() throws Exception { assertNull(vm1.getFieldErrors()); assertNull(vm2.getFieldErrors()); assertNotNull(vm3.getFieldErrors()); assertNull(vm1null.getFieldErrors()); assertNull(vm2null.getFieldErrors()); assertNull(vm3null.getFieldErrors()); vm1.add(null, null, null); vm2.add(null, null, null); vm3.add(null, null, null); vm1null.add(null, null, null); vm2null.add(null, null, null); vm3null.add(null, null, null); assertNull(message, vm1.getFieldErrors().get(0).getMessage()); assertNull(message, vm2.getFieldErrors().get(0).getMessage()); assertNull(message, vm3.getFieldErrors().get(0).getMessage()); assertNull(message, vm1null.getFieldErrors().get(0).getMessage()); assertNull(message, vm2null.getFieldErrors().get(0).getMessage()); assertNull(message, vm3null.getFieldErrors().get(0).getMessage()); vm1.add("testObjectName", "testField", "testMsg"); vm2.add("testObjectName", "testField", "testMsg"); vm3.add("testObjectName", "testField", "testMsg"); vm1null.add("testObjectName", "testField", "testMsg"); vm2null.add("testObjectName", "testField", "testMsg"); vm3null.add("testObjectName", "testField", "testMsg"); assertEquals("testMsg", vm1.getFieldErrors().get(1).getMessage()); assertEquals("testMsg", vm2.getFieldErrors().get(1).getMessage()); assertEquals("testMsg", vm3.getFieldErrors().get(1).getMessage()); assertEquals("testMsg", vm1null.getFieldErrors().get(1).getMessage()); assertEquals("testMsg", vm2null.getFieldErrors().get(1).getMessage()); assertEquals("testMsg", vm3null.getFieldErrors().get(1).getMessage()); }
ParameterizedErrorVM implements Serializable { public String getMessage() { return message; } ParameterizedErrorVM(String message, Map<String, String> paramMap); String getMessage(); Map<String, String> getParams(); }
@Test public void getMessageTest() { ParameterizedErrorVM vm = new ParameterizedErrorVM(null, null); assertNull(vm.getMessage()); Map<String, String> paramMap = new HashMap<>(); paramMap.put("param1", "param1"); paramMap.put("param2", "param2"); vm = new ParameterizedErrorVM("message", paramMap); assertEquals("message", vm.getMessage()); }
ParameterizedErrorVM implements Serializable { public Map<String, String> getParams() { return paramMap; } ParameterizedErrorVM(String message, Map<String, String> paramMap); String getMessage(); Map<String, String> getParams(); }
@Test public void getParamsTest() { ParameterizedErrorVM vm = new ParameterizedErrorVM(null, null); assertNull(vm.getMessage()); Map<String, String> paramMap = new HashMap<>(); paramMap.put("param1", "param1"); paramMap.put("param2", "param2"); vm = new ParameterizedErrorVM("message", paramMap); assertTrue(vm.getParams().size() == 2); }
EurekaVM { public List<Map<String, Object>> getApplications() { return applications; } List<Map<String, Object>> getApplications(); void setApplications(List<Map<String, Object>> applications); Map<String, Object> getStatus(); void setStatus(Map<String, Object> status); }
@Test public void getApplicationsTest() throws Exception { List<Map<String, Object>> list = eureka.getApplications(); assertNull(list); eureka.setApplications(initFakeApplicationsList()); list = eureka.getApplications(); assertNotNull(list); assertTrue(list.size()==2); }
EurekaVM { public void setApplications(List<Map<String, Object>> applications) { this.applications = applications; } List<Map<String, Object>> getApplications(); void setApplications(List<Map<String, Object>> applications); Map<String, Object> getStatus(); void setStatus(Map<String, Object> status); }
@Test public void setApplicationsTest() throws Exception { assertNull(eureka.getApplications()); eureka.setApplications(initFakeApplicationsList()); assertNotNull(eureka.getApplications()); List<Map<String, Object>> newList = new ArrayList<>(); eureka.setApplications(newList); assertEquals(newList, eureka.getApplications()); }
EurekaVM { public Map<String, Object> getStatus() { return status; } List<Map<String, Object>> getApplications(); void setApplications(List<Map<String, Object>> applications); Map<String, Object> getStatus(); void setStatus(Map<String, Object> status); }
@Test public void getStatusTest() throws Exception { Map<String, Object> status = eureka.getStatus(); assertNull(status); eureka.setStatus(initFakeStatus()); status = eureka.getStatus(); assertNotNull(status); assertTrue(status.size()==3); }
EurekaVM { public void setStatus(Map<String, Object> status) { this.status = status; } List<Map<String, Object>> getApplications(); void setApplications(List<Map<String, Object>> applications); Map<String, Object> getStatus(); void setStatus(Map<String, Object> status); }
@Test public void setStatusTest() throws Exception { assertNull(eureka.getStatus()); eureka.setStatus(initFakeStatus()); assertNotNull(eureka.getStatus()); Map<String, Object> newStatus = new HashMap<>(); eureka.setStatus(newStatus); assertEquals(newStatus, eureka.getStatus()); }
LoggerVM { public String getName() { return name; } LoggerVM(Logger logger); @JsonCreator LoggerVM(); String getName(); void setName(String name); String getLevel(); void setLevel(String level); @Override String toString(); }
@Test public void getNameTest() throws Exception { LoggerVM vm = new LoggerVM(); assertNull(vm.getName()); Logger logger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); vm = new LoggerVM(logger); assertEquals(Logger.ROOT_LOGGER_NAME, vm.getName()); }
LoggerVM { public void setName(String name) { this.name = name; } LoggerVM(Logger logger); @JsonCreator LoggerVM(); String getName(); void setName(String name); String getLevel(); void setLevel(String level); @Override String toString(); }
@Test public void setNameTest() throws Exception { LoggerVM vm = new LoggerVM(); vm.setName(null); assertNull(vm.getName()); vm = new LoggerVM(); vm.setName("fakeName"); assertEquals("fakeName", vm.getName()); Logger logger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); vm = new LoggerVM(logger); vm.setName("fakeRootName"); assertEquals("fakeRootName", vm.getName()); }
LoggerVM { public String getLevel() { return level; } LoggerVM(Logger logger); @JsonCreator LoggerVM(); String getName(); void setName(String name); String getLevel(); void setLevel(String level); @Override String toString(); }
@Test public void getLevelTest() throws Exception { LoggerVM vm = new LoggerVM(); assertNull(vm.getLevel()); Logger logger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); vm = new LoggerVM(logger); assertEquals(Level.ERROR.toString(), vm.getLevel()); }
LoggerVM { public void setLevel(String level) { this.level = level; } LoggerVM(Logger logger); @JsonCreator LoggerVM(); String getName(); void setName(String name); String getLevel(); void setLevel(String level); @Override String toString(); }
@Test public void setLevelTest() throws Exception { LoggerVM vm = new LoggerVM(); vm.setLevel(null); assertNull(vm.getLevel()); vm = new LoggerVM(); vm.setLevel("fakeLevel"); assertEquals("fakeLevel", vm.getLevel()); Logger logger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); vm = new LoggerVM(logger); vm.setLevel(Level.OFF.toString()); assertEquals(Level.OFF.toString(), vm.getLevel()); }
LoggerVM { @Override public String toString() { return "LoggerVM{" + "name='" + name + '\'' + ", level='" + level + '\'' + '}'; } LoggerVM(Logger logger); @JsonCreator LoggerVM(); String getName(); void setName(String name); String getLevel(); void setLevel(String level); @Override String toString(); }
@Test public void toStringTestTest() throws Exception { Logger logger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); LoggerVM vm = new LoggerVM(logger); assertTrue(vm.toString().startsWith(LoggerVM.class.getSimpleName())); String json = vm.toString().replace(LoggerVM.class.getSimpleName(), ""); assertTrue(TestUtils.isValid(json)); }
LoginVM { public String getUsername() { return username; } String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); Boolean isRememberMe(); void setRememberMe(Boolean rememberMe); @Override String toString(); }
@Test public void getUsernameTest(){ LoginVM vm = new LoginVM(); assertNull(vm.getUsername()); vm.setUsername("fakeUsername"); assertEquals("fakeUsername", vm.getUsername()); }
LoginVM { public void setUsername(String username) { this.username = username; } String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); Boolean isRememberMe(); void setRememberMe(Boolean rememberMe); @Override String toString(); }
@Test public void setUsernameTest(){ LoginVM vm = new LoginVM(); assertNull(vm.getUsername()); vm.setUsername(null); assertNull(vm.getUsername()); vm.setUsername("fakeUsername"); assertEquals("fakeUsername", vm.getUsername()); vm = new LoginVM(); vm.setPassword("goodPassword"); assertFalse(validator.validate(vm).isEmpty()); vm.setUsername(""); assertFalse(validator.validate(vm).isEmpty()); vm.setUsername("badUsernameTooLongbadUsernameTooLongbadUsernameTooLongbadUsernameTooLongbadUsernameTooLong"); assertFalse(validator.validate(vm).isEmpty()); vm.setUsername("goodUsername"); assertTrue(validator.validate(vm).isEmpty()); }
LoginVM { public String getPassword() { return password; } String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); Boolean isRememberMe(); void setRememberMe(Boolean rememberMe); @Override String toString(); }
@Test public void getPasswordTest(){ LoginVM vm = new LoginVM(); assertNull(vm.getPassword()); vm.setPassword("fakePassword"); assertEquals("fakePassword", vm.getPassword()); }
LoginVM { public void setPassword(String password) { this.password = password; } String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); Boolean isRememberMe(); void setRememberMe(Boolean rememberMe); @Override String toString(); }
@Test public void setPasswordTest(){ LoginVM vm = new LoginVM(); assertNull(vm.getPassword()); vm.setPassword(null); assertNull(vm.getPassword()); vm.setPassword("fakePassword"); assertEquals("fakePassword", vm.getPassword()); vm = new LoginVM(); vm.setUsername("goodUsername"); vm.setPassword("goodPassword"); assertTrue(validator.validate(vm).isEmpty()); }
LoginVM { public Boolean isRememberMe() { return rememberMe; } String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); Boolean isRememberMe(); void setRememberMe(Boolean rememberMe); @Override String toString(); }
@Test public void isRememberMeTest(){ LoginVM vm = new LoginVM(); assertNull(vm.isRememberMe()); vm.setRememberMe(true); assertTrue(vm.isRememberMe()); }
LoginVM { public void setRememberMe(Boolean rememberMe) { this.rememberMe = rememberMe; } String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); Boolean isRememberMe(); void setRememberMe(Boolean rememberMe); @Override String toString(); }
@Test public void setRememberMeTest(){ LoginVM vm = new LoginVM(); assertNull(vm.isRememberMe()); vm.setRememberMe(null); assertNull(vm.isRememberMe()); vm.setRememberMe(true); assertTrue(vm.isRememberMe()); }
LoginVM { @Override public String toString() { return "LoginVM{" + "username='" + username + '\'' + ", rememberMe=" + rememberMe + '}'; } String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); Boolean isRememberMe(); void setRememberMe(Boolean rememberMe); @Override String toString(); }
@Test public void toStringTest(){ LoginVM vm = new LoginVM(); assertTrue(vm.toString().startsWith(LoginVM.class.getSimpleName())); String json = vm.toString().replace(LoginVM.class.getSimpleName(), ""); assertTrue(TestUtils.isValid(json)); vm = new LoginVM(); vm.setUsername("fakeUsername"); vm.setPassword("fakePassword"); vm.setRememberMe(true); json = vm.toString().replace(LoginVM.class.getSimpleName(), ""); assertTrue(TestUtils.isValid(json)); }
UserVM { public String getLogin() { return login; } UserVM(); UserVM(String login, Set<String> authorities); String getLogin(); Set<String> getAuthorities(); @Override String toString(); }
@Test public void getLoginTest() { UserVM vm = new UserVM(); assertNull(vm.getLogin()); vm = new UserVM("login", null); assertEquals("login", vm.getLogin()); }
UserVM { public Set<String> getAuthorities() { return authorities; } UserVM(); UserVM(String login, Set<String> authorities); String getLogin(); Set<String> getAuthorities(); @Override String toString(); }
@Test public void getAuthoritiesTest() throws Exception { UserVM vm = new UserVM(); assertNull(vm.getAuthorities()); Set<String> set = new HashSet<>(); set.add("authorities1"); set.add("authorities2"); vm = new UserVM("login", set); assertEquals(set, vm.getAuthorities()); }
UserVM { @Override public String toString() { return "UserVM{" + "login='" + login + '\'' + ", authorities=" + authorities + "}"; } UserVM(); UserVM(String login, Set<String> authorities); String getLogin(); Set<String> getAuthorities(); @Override String toString(); }
@Test public void toStringTest() throws Exception { UserVM vm = new UserVM(); assertTrue(vm.toString().startsWith(UserVM.class.getSimpleName())); String json = vm.toString().replace(UserVM.class.getSimpleName(), ""); assertTrue(TestUtils.isValid(json)); Set<String> set = new HashSet<>(); set.add("authorities1"); set.add("authorities2"); vm = new UserVM("fakeLogin",set); json = vm.toString().replace(UserVM.class.getSimpleName(), ""); assertTrue(TestUtils.isValid(json)); }
WebConfigurer implements ServletContextInitializer, EmbeddedServletContainerCustomizer { @Override public void onStartup(ServletContext servletContext) throws ServletException { if (env.getActiveProfiles().length != 0) { log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles()); } EnumSet<DispatcherType> disps = EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.ASYNC); initMetrics(servletContext, disps); log.info("Web application fully configured"); } WebConfigurer(Environment env, JHipsterProperties jHipsterProperties); @Override void onStartup(ServletContext servletContext); @Override void customize(ConfigurableEmbeddedServletContainer container); @Bean CorsFilter corsFilter(); @Autowired(required = false) void setMetricRegistry(MetricRegistry metricRegistry); }
@Test public void testStartUpProdServletContext() throws ServletException { env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); webConfigurer.onStartup(servletContext); assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry); assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)).isEqualTo(metricRegistry); verify(servletContext).addFilter(eq("webappMetricsFilter"), any(InstrumentedFilter.class)); verify(servletContext).addServlet(eq("metricsServlet"), any(MetricsServlet.class)); } @Test public void testStartUpDevServletContext() throws ServletException { env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT); webConfigurer.onStartup(servletContext); assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry); assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)).isEqualTo(metricRegistry); verify(servletContext).addFilter(eq("webappMetricsFilter"), any(InstrumentedFilter.class)); verify(servletContext).addServlet(eq("metricsServlet"), any(MetricsServlet.class)); }
WebConfigurer implements ServletContextInitializer, EmbeddedServletContainerCustomizer { @Override public void customize(ConfigurableEmbeddedServletContainer container) { MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT); mappings.add("html", "text/html;charset=utf-8"); mappings.add("json", "text/html;charset=utf-8"); container.setMimeMappings(mappings); if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) && container instanceof UndertowEmbeddedServletContainerFactory) { ((UndertowEmbeddedServletContainerFactory) container) .addBuilderCustomizers(builder -> builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true)); } } WebConfigurer(Environment env, JHipsterProperties jHipsterProperties); @Override void onStartup(ServletContext servletContext); @Override void customize(ConfigurableEmbeddedServletContainer container); @Bean CorsFilter corsFilter(); @Autowired(required = false) void setMetricRegistry(MetricRegistry metricRegistry); }
@Test public void testCustomizeServletContainer() { env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); UndertowEmbeddedServletContainerFactory container = new UndertowEmbeddedServletContainerFactory(); webConfigurer.customize(container); assertThat(container.getMimeMappings().get("abs")).isEqualTo("audio/x-mpeg"); assertThat(container.getMimeMappings().get("html")).isEqualTo("text/html;charset=utf-8"); assertThat(container.getMimeMappings().get("json")).isEqualTo("text/html;charset=utf-8"); Builder builder = Undertow.builder(); container.getBuilderCustomizers().forEach(c -> c.customize(builder)); OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isNull(); } @Test public void testUndertowHttp2Enabled() { props.getHttp().setVersion(JHipsterProperties.Http.Version.V_2_0); UndertowEmbeddedServletContainerFactory container = new UndertowEmbeddedServletContainerFactory(); webConfigurer.customize(container); Builder builder = Undertow.builder(); container.getBuilderCustomizers().forEach(c -> c.customize(builder)); OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isTrue(); }
WebConfigurer implements ServletContextInitializer, EmbeddedServletContainerCustomizer { @Bean public CorsFilter corsFilter() { UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); CorsConfiguration config = jHipsterProperties.getCors(); if (config.getAllowedOrigins() != null && !config.getAllowedOrigins().isEmpty()) { log.debug("Registering CORS filter"); source.registerCorsConfiguration("/api/**", config); source.registerCorsConfiguration("/v2/api-docs", config); } return new CorsFilter(source); } WebConfigurer(Environment env, JHipsterProperties jHipsterProperties); @Override void onStartup(ServletContext servletContext); @Override void customize(ConfigurableEmbeddedServletContainer container); @Bean CorsFilter corsFilter(); @Autowired(required = false) void setMetricRegistry(MetricRegistry metricRegistry); }
@Test public void testCorsFilterOnApiPath() throws Exception { props.getCors().setAllowedOrigins(Collections.singletonList("*")); props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); props.getCors().setAllowedHeaders(Collections.singletonList("*")); props.getCors().setMaxAge(1800L); props.getCors().setAllowCredentials(true); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) .addFilters(webConfigurer.corsFilter()) .build(); mockMvc.perform( options("/api/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com") .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "POST")) .andExpect(status().isOk()) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")) .andExpect(header().string(HttpHeaders.VARY, "Origin")) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET,POST,PUT,DELETE")) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true")) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_MAX_AGE, "1800")); mockMvc.perform( get("/api/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com")) .andExpect(status().isOk()) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")); } @Test public void testCorsFilterOnOtherPath() throws Exception { props.getCors().setAllowedOrigins(Collections.singletonList("*")); props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); props.getCors().setAllowedHeaders(Collections.singletonList("*")); props.getCors().setMaxAge(1800L); props.getCors().setAllowCredentials(true); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) .addFilters(webConfigurer.corsFilter()) .build(); mockMvc.perform( get("/test/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com")) .andExpect(status().isOk()) .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); } @Test public void testCorsFilterDeactivated() throws Exception { props.getCors().setAllowedOrigins(null); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) .addFilters(webConfigurer.corsFilter()) .build(); mockMvc.perform( get("/api/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com")) .andExpect(status().isOk()) .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); } @Test public void testCorsFilterDeactivated2() throws Exception { props.getCors().setAllowedOrigins(new ArrayList<>()); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) .addFilters(webConfigurer.corsFilter()) .build(); mockMvc.perform( get("/api/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com")) .andExpect(status().isOk()) .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); }
WebConfigurer implements ServletContextInitializer, EmbeddedServletContainerCustomizer { @Override public void onStartup(ServletContext servletContext) throws ServletException { if (env.getActiveProfiles().length != 0) { log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles()); } EnumSet<DispatcherType> disps = EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.ASYNC); initMetrics(servletContext, disps); if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { initCachingHttpHeadersFilter(servletContext, disps); } if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { initH2Console(servletContext); } log.info("Web application fully configured"); } WebConfigurer(Environment env, JHipsterProperties jHipsterProperties, HazelcastInstance hazelcastInstance); @Override void onStartup(ServletContext servletContext); @Override void customize(ConfigurableEmbeddedServletContainer container); @Bean CorsFilter corsFilter(); @Autowired(required = false) void setMetricRegistry(MetricRegistry metricRegistry); }
@Test public void testStartUpProdServletContext() throws ServletException { env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); webConfigurer.onStartup(servletContext); assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry); assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)).isEqualTo(metricRegistry); verify(servletContext).addFilter(eq("webappMetricsFilter"), any(InstrumentedFilter.class)); verify(servletContext).addServlet(eq("metricsServlet"), any(MetricsServlet.class)); verify(servletContext).addFilter(eq("cachingHttpHeadersFilter"), any(CachingHttpHeadersFilter.class)); verify(servletContext, never()).addServlet(eq("H2Console"), any(WebServlet.class)); } @Test public void testStartUpDevServletContext() throws ServletException { env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT); webConfigurer.onStartup(servletContext); assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry); assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)).isEqualTo(metricRegistry); verify(servletContext).addFilter(eq("webappMetricsFilter"), any(InstrumentedFilter.class)); verify(servletContext).addServlet(eq("metricsServlet"), any(MetricsServlet.class)); verify(servletContext, never()).addFilter(eq("cachingHttpHeadersFilter"), any(CachingHttpHeadersFilter.class)); verify(servletContext).addServlet(eq("H2Console"), any(WebServlet.class)); }
SnapshotCreationService { public void createSnapshotEvents(final String eventType, String filter) { final SnapshotEventGenerator snapshotEventGenerator = snapshotEventProviders.get(eventType); if (snapshotEventGenerator == null) { throw new UnknownEventTypeException(eventType); } Object lastProcessedId = null; do { final List<Snapshot> snapshots = snapshotEventGenerator.generateSnapshots(lastProcessedId, filter); if (snapshots.isEmpty()) { break; } for (final Snapshot snapshot : snapshots) { eventLogWriter.fireSnapshotEvent(eventType, snapshot.getDataType(), snapshot.getData()); lastProcessedId = snapshot.getId(); } } while (true); } SnapshotCreationService(List<SnapshotEventGenerator> snapshotEventGenerators, EventLogWriter eventLogWriter); void createSnapshotEvents(final String eventType, String filter); Set<String> getSupportedEventTypes(); }
@Test public void testCreateSnapshotEvents() { final String filter = "exampleFilter"; when(snapshotEventGenerator.generateSnapshots(null, filter)).thenReturn( singletonList(new Snapshot(1, PUBLISHER_DATA_TYPE, eventPayload))); snapshotCreationService.createSnapshotEvents(PUBLISHER_EVENT_TYPE, filter); verify(eventLogWriter).fireSnapshotEvent(eq(PUBLISHER_EVENT_TYPE), eq(PUBLISHER_DATA_TYPE), listEventLogCaptor.capture()); assertThat(listEventLogCaptor.getValue(), is(eventPayload)); } @Test public void testSnapshotSavedInBatches() { final String filter = "exampleFilter2"; final List<Snapshot> eventPayloads = Fixture.mockSnapshotList(5); when(snapshotEventGenerator.generateSnapshots(null, filter)).thenReturn(eventPayloads.subList(0, 3)); when(snapshotEventGenerator.generateSnapshots(2, filter)).thenReturn(eventPayloads.subList(3, 5)); when(snapshotEventGenerator.generateSnapshots(4, filter)).thenReturn(emptyList()); snapshotCreationService.createSnapshotEvents(PUBLISHER_EVENT_TYPE, filter); verify(eventLogWriter, times(5)).fireSnapshotEvent(eq(PUBLISHER_EVENT_TYPE), eq(PUBLISHER_DATA_TYPE), isA(MockPayload.class)); }
MockNakadiPublishingClient implements NakadiPublishingClient { public synchronized List<String> getSentEvents(String eventType) { ArrayList<String> events = new ArrayList<>(); List<String> sentEvents = this.sentEvents.get(eventType); if (sentEvents != null) { events.addAll(sentEvents); } return events; } MockNakadiPublishingClient(); MockNakadiPublishingClient(ObjectMapper objectMapper); @Override synchronized void publish(String eventType, List<?> nakadiEvents); synchronized List<String> getSentEvents(String eventType); synchronized void clearSentEvents(); }
@Test public void returnsEmptyResultIfNoEventsHaveBeenSent() { assertThat(mockNakadiPublishingClient.getSentEvents("myEventType"), is(empty())); }
EventBatcher { public void finish() { if (!batch.isEmpty()) { this.publisher.accept(batch); } } EventBatcher(ObjectMapper objectMapper, Consumer<List<BatchItem>> publisher); void pushEvent(EventLog eventLogEntry, NakadiEvent nakadiEvent); void finish(); }
@Test public void shouldNotPublishEmptyBatches() { eventBatcher.finish(); verify(publisher, never()).accept(any()); }
EventBatcher { public void pushEvent(EventLog eventLogEntry, NakadiEvent nakadiEvent) { long eventSize; try { eventSize = objectMapper.writeValueAsBytes(nakadiEvent).length; } catch (Exception e) { log.error("Could not serialize event {} of type {}, skipping it.", eventLogEntry.getId(), eventLogEntry.getEventType(), e); return; } if (!batch.isEmpty() && (hasAnotherEventType(batch, eventLogEntry) || batchWouldBecomeTooBig(aggregatedBatchSize, eventSize))) { this.publisher.accept(batch); batch = new ArrayList<>(); aggregatedBatchSize = 0; } batch.add(new BatchItem(eventLogEntry, nakadiEvent)); aggregatedBatchSize += eventSize; } EventBatcher(ObjectMapper objectMapper, Consumer<List<BatchItem>> publisher); void pushEvent(EventLog eventLogEntry, NakadiEvent nakadiEvent); void finish(); }
@Test public void shouldPublishNonFilledBatchOnEventTypeChange() throws JsonProcessingException { EventLog eventLogEntry1 = eventLogEntry(1, "type1"); EventLog eventLogEntry2 = eventLogEntry(2, "type2"); NakadiEvent nakadiEvent1 = nakadiEvent("1"); NakadiEvent nakadiEvent2 = nakadiEvent("2"); when(objectMapper.writeValueAsBytes(any())).thenReturn(new byte[500]); eventBatcher.pushEvent(eventLogEntry1, nakadiEvent1); eventBatcher.pushEvent(eventLogEntry2, nakadiEvent2); verify(publisher).accept(eq(singletonList(new BatchItem(eventLogEntry1, nakadiEvent1)))); } @Test public void shouldPublishFilledBatchOnSubmissionOfNewEvent() throws JsonProcessingException { EventLog eventLogEntry1 = eventLogEntry(1, "type1"); EventLog eventLogEntry2 = eventLogEntry(2, "type1"); EventLog eventLogEntry3 = eventLogEntry(3, "type1"); NakadiEvent nakadiEvent1 = nakadiEvent("1"); NakadiEvent nakadiEvent2 = nakadiEvent("2"); NakadiEvent nakadiEvent3 = nakadiEvent("3"); when(objectMapper.writeValueAsBytes(any())).thenReturn(new byte[15000000]); eventBatcher.pushEvent(eventLogEntry1, nakadiEvent1); eventBatcher.pushEvent(eventLogEntry2, nakadiEvent2); eventBatcher.pushEvent(eventLogEntry3, nakadiEvent3); verify(publisher) .accept(eq(asList( new BatchItem(eventLogEntry1, nakadiEvent1), new BatchItem(eventLogEntry2, nakadiEvent2) ))); } @Test public void shouldTryPublishEventsIndividuallyWhenTheyExceedBatchThresholdThe() throws JsonProcessingException { EventLog eventLogEntry1 = eventLogEntry(1, "type1"); EventLog eventLogEntry2 = eventLogEntry(2, "type1"); NakadiEvent nakadiEvent1 = nakadiEvent("1"); NakadiEvent nakadiEvent2 = nakadiEvent("2"); when(objectMapper.writeValueAsBytes(any())) .thenReturn(new byte[45000000]) .thenReturn(new byte[450]); eventBatcher.pushEvent(eventLogEntry1, nakadiEvent1); eventBatcher.pushEvent(eventLogEntry2, nakadiEvent2); verify(publisher).accept(eq(singletonList(new BatchItem(eventLogEntry1, nakadiEvent1)))); }
TracerFlowIdComponent implements FlowIdComponent { @Override public void startTraceIfNoneExists() { if (tracer != null) { try { tracer.get(X_FLOW_ID).getValue(); } catch (IllegalArgumentException e) { log.warn("No trace was configured for the name {}. Returning null. " + "To configure Tracer provide an application property: " + "tracer.traces.X-Flow-ID=flow-id", X_FLOW_ID); } catch (IllegalStateException e) { tracer.start(); } } else { log.warn("No bean of class Tracer was found."); } } TracerFlowIdComponent(Tracer tracer); String getXFlowIdKey(); @Override String getXFlowIdValue(); @Override void startTraceIfNoneExists(); }
@Test public void makeSureTraceWillBeStartedIfNoneHasBeenStartedBefore() { TracerFlowIdComponent flowIdComponent = new TracerFlowIdComponent(tracer); when(tracer.get("X-Flow-ID").getValue()).thenThrow(new IllegalStateException()); flowIdComponent.startTraceIfNoneExists(); verify(tracer).start(); } @Test public void wontFailIfTraceHasNotBeenConfiguredInStartTrace() { TracerFlowIdComponent flowIdComponent = new TracerFlowIdComponent(tracer); when(tracer.get("X-Flow-ID")).thenThrow(new IllegalArgumentException()); flowIdComponent.startTraceIfNoneExists(); } @Test public void makeSureTraceWillNotStartedIfOneExists() { TracerFlowIdComponent flowIdComponent = new TracerFlowIdComponent(tracer); when(tracer.get("X-Flow-ID").getValue()).thenReturn("A_FUNKY_VALUE"); flowIdComponent.startTraceIfNoneExists(); verify(tracer, never()).start(); }
BlueOceanApi { public void deletePipelineQueueItem(String organization, String pipeline, String queue) throws ApiException { deletePipelineQueueItemWithHttpInfo(organization, pipeline, queue); } BlueOceanApi(); BlueOceanApi(ApiClient apiClient); ApiClient getApiClient(); void setApiClient(ApiClient apiClient); com.squareup.okhttp.Call deletePipelineQueueItemCall(String organization, String pipeline, String queue, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); void deletePipelineQueueItem(String organization, String pipeline, String queue); ApiResponse<Void> deletePipelineQueueItemWithHttpInfo(String organization, String pipeline, String queue); com.squareup.okhttp.Call deletePipelineQueueItemAsync(String organization, String pipeline, String queue, final ApiCallback<Void> callback); com.squareup.okhttp.Call getAuthenticatedUserCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getAuthenticatedUser(String organization); ApiResponse<User> getAuthenticatedUserWithHttpInfo(String organization); com.squareup.okhttp.Call getAuthenticatedUserAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call getClassesCall(String propertyClass, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getClasses(String propertyClass); ApiResponse<String> getClassesWithHttpInfo(String propertyClass); com.squareup.okhttp.Call getClassesAsync(String propertyClass, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebKeyCall(Integer key, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebKey(Integer key); ApiResponse<String> getJsonWebKeyWithHttpInfo(Integer key); com.squareup.okhttp.Call getJsonWebKeyAsync(Integer key, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebTokenCall(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebToken(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); ApiResponse<String> getJsonWebTokenWithHttpInfo(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); com.squareup.okhttp.Call getJsonWebTokenAsync(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ApiCallback<String> callback); com.squareup.okhttp.Call getOrganisationCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisation getOrganisation(String organization); ApiResponse<Organisation> getOrganisationWithHttpInfo(String organization); com.squareup.okhttp.Call getOrganisationAsync(String organization, final ApiCallback<Organisation> callback); com.squareup.okhttp.Call getOrganisationsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisations getOrganisations(); ApiResponse<Organisations> getOrganisationsWithHttpInfo(); com.squareup.okhttp.Call getOrganisationsAsync(final ApiCallback<Organisations> callback); com.squareup.okhttp.Call getPipelineCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipeline getPipeline(String organization, String pipeline); ApiResponse<Pipeline> getPipelineWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineAsync(String organization, String pipeline, final ApiCallback<Pipeline> callback); com.squareup.okhttp.Call getPipelineActivitiesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineActivities getPipelineActivities(String organization, String pipeline); ApiResponse<PipelineActivities> getPipelineActivitiesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineActivitiesAsync(String organization, String pipeline, final ApiCallback<PipelineActivities> callback); com.squareup.okhttp.Call getPipelineBranchCall(String organization, String pipeline, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); BranchImpl getPipelineBranch(String organization, String pipeline, String branch); ApiResponse<BranchImpl> getPipelineBranchWithHttpInfo(String organization, String pipeline, String branch); com.squareup.okhttp.Call getPipelineBranchAsync(String organization, String pipeline, String branch, final ApiCallback<BranchImpl> callback); com.squareup.okhttp.Call getPipelineBranchRunCall(String organization, String pipeline, String branch, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineBranchRun(String organization, String pipeline, String branch, String run); ApiResponse<PipelineRun> getPipelineBranchRunWithHttpInfo(String organization, String pipeline, String branch, String run); com.squareup.okhttp.Call getPipelineBranchRunAsync(String organization, String pipeline, String branch, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineBranchesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); MultibranchPipeline getPipelineBranches(String organization, String pipeline); ApiResponse<MultibranchPipeline> getPipelineBranchesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineBranchesAsync(String organization, String pipeline, final ApiCallback<MultibranchPipeline> callback); com.squareup.okhttp.Call getPipelineFolderCall(String organization, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineFolderImpl getPipelineFolder(String organization, String folder); ApiResponse<PipelineFolderImpl> getPipelineFolderWithHttpInfo(String organization, String folder); com.squareup.okhttp.Call getPipelineFolderAsync(String organization, String folder, final ApiCallback<PipelineFolderImpl> callback); com.squareup.okhttp.Call getPipelineFolderPipelineCall(String organization, String pipeline, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineImpl getPipelineFolderPipeline(String organization, String pipeline, String folder); ApiResponse<PipelineImpl> getPipelineFolderPipelineWithHttpInfo(String organization, String pipeline, String folder); com.squareup.okhttp.Call getPipelineFolderPipelineAsync(String organization, String pipeline, String folder, final ApiCallback<PipelineImpl> callback); com.squareup.okhttp.Call getPipelineQueueCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineQueue getPipelineQueue(String organization, String pipeline); ApiResponse<PipelineQueue> getPipelineQueueWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineQueueAsync(String organization, String pipeline, final ApiCallback<PipelineQueue> callback); com.squareup.okhttp.Call getPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineRun(String organization, String pipeline, String run); ApiResponse<PipelineRun> getPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineRunLogCall(String organization, String pipeline, String run, Integer start, Boolean download, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunLog(String organization, String pipeline, String run, Integer start, Boolean download); ApiResponse<String> getPipelineRunLogWithHttpInfo(String organization, String pipeline, String run, Integer start, Boolean download); com.squareup.okhttp.Call getPipelineRunLogAsync(String organization, String pipeline, String run, Integer start, Boolean download, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNode getPipelineRunNode(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNode> getPipelineRunNodeWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNode> callback); com.squareup.okhttp.Call getPipelineRunNodeStepCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineStepImpl getPipelineRunNodeStep(String organization, String pipeline, String run, String node, String step); ApiResponse<PipelineStepImpl> getPipelineRunNodeStepWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<PipelineStepImpl> callback); com.squareup.okhttp.Call getPipelineRunNodeStepLogCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunNodeStepLog(String organization, String pipeline, String run, String node, String step); ApiResponse<String> getPipelineRunNodeStepLogWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepLogAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeStepsCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodeSteps getPipelineRunNodeSteps(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNodeSteps> getPipelineRunNodeStepsWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeStepsAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNodeSteps> callback); com.squareup.okhttp.Call getPipelineRunNodesCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodes getPipelineRunNodes(String organization, String pipeline, String run); ApiResponse<PipelineRunNodes> getPipelineRunNodesWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunNodesAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRunNodes> callback); com.squareup.okhttp.Call getPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRuns getPipelineRuns(String organization, String pipeline); ApiResponse<PipelineRuns> getPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineRunsAsync(String organization, String pipeline, final ApiCallback<PipelineRuns> callback); com.squareup.okhttp.Call getPipelinesCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipelines getPipelines(String organization); ApiResponse<Pipelines> getPipelinesWithHttpInfo(String organization); com.squareup.okhttp.Call getPipelinesAsync(String organization, final ApiCallback<Pipelines> callback); com.squareup.okhttp.Call getSCMCall(String organization, String scm, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); GithubScm getSCM(String organization, String scm); ApiResponse<GithubScm> getSCMWithHttpInfo(String organization, String scm); com.squareup.okhttp.Call getSCMAsync(String organization, String scm, final ApiCallback<GithubScm> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoriesCall(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepositories(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoriesWithHttpInfo(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); com.squareup.okhttp.Call getSCMOrganisationRepositoriesAsync(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoryCall(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepository(String organization, String scm, String scmOrganisation, String repository, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoryWithHttpInfo(String organization, String scm, String scmOrganisation, String repository, String credentialId); com.squareup.okhttp.Call getSCMOrganisationRepositoryAsync(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationsCall(String organization, String scm, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisations(String organization, String scm, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationsWithHttpInfo(String organization, String scm, String credentialId); com.squareup.okhttp.Call getSCMOrganisationsAsync(String organization, String scm, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getUserCall(String organization, String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUser(String organization, String user); ApiResponse<User> getUserWithHttpInfo(String organization, String user); com.squareup.okhttp.Call getUserAsync(String organization, String user, final ApiCallback<User> callback); com.squareup.okhttp.Call getUserFavoritesCall(String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); UserFavorites getUserFavorites(String user); ApiResponse<UserFavorites> getUserFavoritesWithHttpInfo(String user); com.squareup.okhttp.Call getUserFavoritesAsync(String user, final ApiCallback<UserFavorites> callback); com.squareup.okhttp.Call getUsersCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUsers(String organization); ApiResponse<User> getUsersWithHttpInfo(String organization); com.squareup.okhttp.Call getUsersAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call postPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRun(String organization, String pipeline, String run); ApiResponse<QueueItemImpl> postPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call postPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call postPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRuns(String organization, String pipeline); ApiResponse<QueueItemImpl> postPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call postPipelineRunsAsync(String organization, String pipeline, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call putPipelineFavoriteCall(String organization, String pipeline, Body body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); FavoriteImpl putPipelineFavorite(String organization, String pipeline, Body body); ApiResponse<FavoriteImpl> putPipelineFavoriteWithHttpInfo(String organization, String pipeline, Body body); com.squareup.okhttp.Call putPipelineFavoriteAsync(String organization, String pipeline, Body body, final ApiCallback<FavoriteImpl> callback); com.squareup.okhttp.Call putPipelineRunCall(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun putPipelineRun(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); ApiResponse<PipelineRun> putPipelineRunWithHttpInfo(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); com.squareup.okhttp.Call putPipelineRunAsync(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call searchCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String search(String q); ApiResponse<String> searchWithHttpInfo(String q); com.squareup.okhttp.Call searchAsync(String q, final ApiCallback<String> callback); com.squareup.okhttp.Call searchClassesCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String searchClasses(String q); ApiResponse<String> searchClassesWithHttpInfo(String q); com.squareup.okhttp.Call searchClassesAsync(String q, final ApiCallback<String> callback); }
@Test public void deletePipelineQueueItemTest() throws ApiException { String organization = null; String pipeline = null; String queue = null; api.deletePipelineQueueItem(organization, pipeline, queue); }
BlueOceanApi { public PipelineRun getPipelineBranchRun(String organization, String pipeline, String branch, String run) throws ApiException { ApiResponse<PipelineRun> resp = getPipelineBranchRunWithHttpInfo(organization, pipeline, branch, run); return resp.getData(); } BlueOceanApi(); BlueOceanApi(ApiClient apiClient); ApiClient getApiClient(); void setApiClient(ApiClient apiClient); com.squareup.okhttp.Call deletePipelineQueueItemCall(String organization, String pipeline, String queue, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); void deletePipelineQueueItem(String organization, String pipeline, String queue); ApiResponse<Void> deletePipelineQueueItemWithHttpInfo(String organization, String pipeline, String queue); com.squareup.okhttp.Call deletePipelineQueueItemAsync(String organization, String pipeline, String queue, final ApiCallback<Void> callback); com.squareup.okhttp.Call getAuthenticatedUserCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getAuthenticatedUser(String organization); ApiResponse<User> getAuthenticatedUserWithHttpInfo(String organization); com.squareup.okhttp.Call getAuthenticatedUserAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call getClassesCall(String propertyClass, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getClasses(String propertyClass); ApiResponse<String> getClassesWithHttpInfo(String propertyClass); com.squareup.okhttp.Call getClassesAsync(String propertyClass, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebKeyCall(Integer key, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebKey(Integer key); ApiResponse<String> getJsonWebKeyWithHttpInfo(Integer key); com.squareup.okhttp.Call getJsonWebKeyAsync(Integer key, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebTokenCall(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebToken(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); ApiResponse<String> getJsonWebTokenWithHttpInfo(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); com.squareup.okhttp.Call getJsonWebTokenAsync(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ApiCallback<String> callback); com.squareup.okhttp.Call getOrganisationCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisation getOrganisation(String organization); ApiResponse<Organisation> getOrganisationWithHttpInfo(String organization); com.squareup.okhttp.Call getOrganisationAsync(String organization, final ApiCallback<Organisation> callback); com.squareup.okhttp.Call getOrganisationsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisations getOrganisations(); ApiResponse<Organisations> getOrganisationsWithHttpInfo(); com.squareup.okhttp.Call getOrganisationsAsync(final ApiCallback<Organisations> callback); com.squareup.okhttp.Call getPipelineCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipeline getPipeline(String organization, String pipeline); ApiResponse<Pipeline> getPipelineWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineAsync(String organization, String pipeline, final ApiCallback<Pipeline> callback); com.squareup.okhttp.Call getPipelineActivitiesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineActivities getPipelineActivities(String organization, String pipeline); ApiResponse<PipelineActivities> getPipelineActivitiesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineActivitiesAsync(String organization, String pipeline, final ApiCallback<PipelineActivities> callback); com.squareup.okhttp.Call getPipelineBranchCall(String organization, String pipeline, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); BranchImpl getPipelineBranch(String organization, String pipeline, String branch); ApiResponse<BranchImpl> getPipelineBranchWithHttpInfo(String organization, String pipeline, String branch); com.squareup.okhttp.Call getPipelineBranchAsync(String organization, String pipeline, String branch, final ApiCallback<BranchImpl> callback); com.squareup.okhttp.Call getPipelineBranchRunCall(String organization, String pipeline, String branch, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineBranchRun(String organization, String pipeline, String branch, String run); ApiResponse<PipelineRun> getPipelineBranchRunWithHttpInfo(String organization, String pipeline, String branch, String run); com.squareup.okhttp.Call getPipelineBranchRunAsync(String organization, String pipeline, String branch, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineBranchesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); MultibranchPipeline getPipelineBranches(String organization, String pipeline); ApiResponse<MultibranchPipeline> getPipelineBranchesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineBranchesAsync(String organization, String pipeline, final ApiCallback<MultibranchPipeline> callback); com.squareup.okhttp.Call getPipelineFolderCall(String organization, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineFolderImpl getPipelineFolder(String organization, String folder); ApiResponse<PipelineFolderImpl> getPipelineFolderWithHttpInfo(String organization, String folder); com.squareup.okhttp.Call getPipelineFolderAsync(String organization, String folder, final ApiCallback<PipelineFolderImpl> callback); com.squareup.okhttp.Call getPipelineFolderPipelineCall(String organization, String pipeline, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineImpl getPipelineFolderPipeline(String organization, String pipeline, String folder); ApiResponse<PipelineImpl> getPipelineFolderPipelineWithHttpInfo(String organization, String pipeline, String folder); com.squareup.okhttp.Call getPipelineFolderPipelineAsync(String organization, String pipeline, String folder, final ApiCallback<PipelineImpl> callback); com.squareup.okhttp.Call getPipelineQueueCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineQueue getPipelineQueue(String organization, String pipeline); ApiResponse<PipelineQueue> getPipelineQueueWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineQueueAsync(String organization, String pipeline, final ApiCallback<PipelineQueue> callback); com.squareup.okhttp.Call getPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineRun(String organization, String pipeline, String run); ApiResponse<PipelineRun> getPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineRunLogCall(String organization, String pipeline, String run, Integer start, Boolean download, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunLog(String organization, String pipeline, String run, Integer start, Boolean download); ApiResponse<String> getPipelineRunLogWithHttpInfo(String organization, String pipeline, String run, Integer start, Boolean download); com.squareup.okhttp.Call getPipelineRunLogAsync(String organization, String pipeline, String run, Integer start, Boolean download, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNode getPipelineRunNode(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNode> getPipelineRunNodeWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNode> callback); com.squareup.okhttp.Call getPipelineRunNodeStepCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineStepImpl getPipelineRunNodeStep(String organization, String pipeline, String run, String node, String step); ApiResponse<PipelineStepImpl> getPipelineRunNodeStepWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<PipelineStepImpl> callback); com.squareup.okhttp.Call getPipelineRunNodeStepLogCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunNodeStepLog(String organization, String pipeline, String run, String node, String step); ApiResponse<String> getPipelineRunNodeStepLogWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepLogAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeStepsCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodeSteps getPipelineRunNodeSteps(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNodeSteps> getPipelineRunNodeStepsWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeStepsAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNodeSteps> callback); com.squareup.okhttp.Call getPipelineRunNodesCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodes getPipelineRunNodes(String organization, String pipeline, String run); ApiResponse<PipelineRunNodes> getPipelineRunNodesWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunNodesAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRunNodes> callback); com.squareup.okhttp.Call getPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRuns getPipelineRuns(String organization, String pipeline); ApiResponse<PipelineRuns> getPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineRunsAsync(String organization, String pipeline, final ApiCallback<PipelineRuns> callback); com.squareup.okhttp.Call getPipelinesCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipelines getPipelines(String organization); ApiResponse<Pipelines> getPipelinesWithHttpInfo(String organization); com.squareup.okhttp.Call getPipelinesAsync(String organization, final ApiCallback<Pipelines> callback); com.squareup.okhttp.Call getSCMCall(String organization, String scm, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); GithubScm getSCM(String organization, String scm); ApiResponse<GithubScm> getSCMWithHttpInfo(String organization, String scm); com.squareup.okhttp.Call getSCMAsync(String organization, String scm, final ApiCallback<GithubScm> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoriesCall(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepositories(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoriesWithHttpInfo(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); com.squareup.okhttp.Call getSCMOrganisationRepositoriesAsync(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoryCall(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepository(String organization, String scm, String scmOrganisation, String repository, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoryWithHttpInfo(String organization, String scm, String scmOrganisation, String repository, String credentialId); com.squareup.okhttp.Call getSCMOrganisationRepositoryAsync(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationsCall(String organization, String scm, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisations(String organization, String scm, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationsWithHttpInfo(String organization, String scm, String credentialId); com.squareup.okhttp.Call getSCMOrganisationsAsync(String organization, String scm, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getUserCall(String organization, String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUser(String organization, String user); ApiResponse<User> getUserWithHttpInfo(String organization, String user); com.squareup.okhttp.Call getUserAsync(String organization, String user, final ApiCallback<User> callback); com.squareup.okhttp.Call getUserFavoritesCall(String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); UserFavorites getUserFavorites(String user); ApiResponse<UserFavorites> getUserFavoritesWithHttpInfo(String user); com.squareup.okhttp.Call getUserFavoritesAsync(String user, final ApiCallback<UserFavorites> callback); com.squareup.okhttp.Call getUsersCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUsers(String organization); ApiResponse<User> getUsersWithHttpInfo(String organization); com.squareup.okhttp.Call getUsersAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call postPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRun(String organization, String pipeline, String run); ApiResponse<QueueItemImpl> postPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call postPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call postPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRuns(String organization, String pipeline); ApiResponse<QueueItemImpl> postPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call postPipelineRunsAsync(String organization, String pipeline, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call putPipelineFavoriteCall(String organization, String pipeline, Body body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); FavoriteImpl putPipelineFavorite(String organization, String pipeline, Body body); ApiResponse<FavoriteImpl> putPipelineFavoriteWithHttpInfo(String organization, String pipeline, Body body); com.squareup.okhttp.Call putPipelineFavoriteAsync(String organization, String pipeline, Body body, final ApiCallback<FavoriteImpl> callback); com.squareup.okhttp.Call putPipelineRunCall(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun putPipelineRun(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); ApiResponse<PipelineRun> putPipelineRunWithHttpInfo(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); com.squareup.okhttp.Call putPipelineRunAsync(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call searchCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String search(String q); ApiResponse<String> searchWithHttpInfo(String q); com.squareup.okhttp.Call searchAsync(String q, final ApiCallback<String> callback); com.squareup.okhttp.Call searchClassesCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String searchClasses(String q); ApiResponse<String> searchClassesWithHttpInfo(String q); com.squareup.okhttp.Call searchClassesAsync(String q, final ApiCallback<String> callback); }
@Test public void getPipelineBranchRunTest() throws ApiException { String organization = null; String pipeline = null; String branch = null; String run = null; PipelineRun response = api.getPipelineBranchRun(organization, pipeline, branch, run); }
BlueOceanApi { public MultibranchPipeline getPipelineBranches(String organization, String pipeline) throws ApiException { ApiResponse<MultibranchPipeline> resp = getPipelineBranchesWithHttpInfo(organization, pipeline); return resp.getData(); } BlueOceanApi(); BlueOceanApi(ApiClient apiClient); ApiClient getApiClient(); void setApiClient(ApiClient apiClient); com.squareup.okhttp.Call deletePipelineQueueItemCall(String organization, String pipeline, String queue, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); void deletePipelineQueueItem(String organization, String pipeline, String queue); ApiResponse<Void> deletePipelineQueueItemWithHttpInfo(String organization, String pipeline, String queue); com.squareup.okhttp.Call deletePipelineQueueItemAsync(String organization, String pipeline, String queue, final ApiCallback<Void> callback); com.squareup.okhttp.Call getAuthenticatedUserCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getAuthenticatedUser(String organization); ApiResponse<User> getAuthenticatedUserWithHttpInfo(String organization); com.squareup.okhttp.Call getAuthenticatedUserAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call getClassesCall(String propertyClass, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getClasses(String propertyClass); ApiResponse<String> getClassesWithHttpInfo(String propertyClass); com.squareup.okhttp.Call getClassesAsync(String propertyClass, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebKeyCall(Integer key, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebKey(Integer key); ApiResponse<String> getJsonWebKeyWithHttpInfo(Integer key); com.squareup.okhttp.Call getJsonWebKeyAsync(Integer key, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebTokenCall(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebToken(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); ApiResponse<String> getJsonWebTokenWithHttpInfo(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); com.squareup.okhttp.Call getJsonWebTokenAsync(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ApiCallback<String> callback); com.squareup.okhttp.Call getOrganisationCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisation getOrganisation(String organization); ApiResponse<Organisation> getOrganisationWithHttpInfo(String organization); com.squareup.okhttp.Call getOrganisationAsync(String organization, final ApiCallback<Organisation> callback); com.squareup.okhttp.Call getOrganisationsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisations getOrganisations(); ApiResponse<Organisations> getOrganisationsWithHttpInfo(); com.squareup.okhttp.Call getOrganisationsAsync(final ApiCallback<Organisations> callback); com.squareup.okhttp.Call getPipelineCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipeline getPipeline(String organization, String pipeline); ApiResponse<Pipeline> getPipelineWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineAsync(String organization, String pipeline, final ApiCallback<Pipeline> callback); com.squareup.okhttp.Call getPipelineActivitiesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineActivities getPipelineActivities(String organization, String pipeline); ApiResponse<PipelineActivities> getPipelineActivitiesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineActivitiesAsync(String organization, String pipeline, final ApiCallback<PipelineActivities> callback); com.squareup.okhttp.Call getPipelineBranchCall(String organization, String pipeline, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); BranchImpl getPipelineBranch(String organization, String pipeline, String branch); ApiResponse<BranchImpl> getPipelineBranchWithHttpInfo(String organization, String pipeline, String branch); com.squareup.okhttp.Call getPipelineBranchAsync(String organization, String pipeline, String branch, final ApiCallback<BranchImpl> callback); com.squareup.okhttp.Call getPipelineBranchRunCall(String organization, String pipeline, String branch, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineBranchRun(String organization, String pipeline, String branch, String run); ApiResponse<PipelineRun> getPipelineBranchRunWithHttpInfo(String organization, String pipeline, String branch, String run); com.squareup.okhttp.Call getPipelineBranchRunAsync(String organization, String pipeline, String branch, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineBranchesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); MultibranchPipeline getPipelineBranches(String organization, String pipeline); ApiResponse<MultibranchPipeline> getPipelineBranchesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineBranchesAsync(String organization, String pipeline, final ApiCallback<MultibranchPipeline> callback); com.squareup.okhttp.Call getPipelineFolderCall(String organization, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineFolderImpl getPipelineFolder(String organization, String folder); ApiResponse<PipelineFolderImpl> getPipelineFolderWithHttpInfo(String organization, String folder); com.squareup.okhttp.Call getPipelineFolderAsync(String organization, String folder, final ApiCallback<PipelineFolderImpl> callback); com.squareup.okhttp.Call getPipelineFolderPipelineCall(String organization, String pipeline, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineImpl getPipelineFolderPipeline(String organization, String pipeline, String folder); ApiResponse<PipelineImpl> getPipelineFolderPipelineWithHttpInfo(String organization, String pipeline, String folder); com.squareup.okhttp.Call getPipelineFolderPipelineAsync(String organization, String pipeline, String folder, final ApiCallback<PipelineImpl> callback); com.squareup.okhttp.Call getPipelineQueueCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineQueue getPipelineQueue(String organization, String pipeline); ApiResponse<PipelineQueue> getPipelineQueueWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineQueueAsync(String organization, String pipeline, final ApiCallback<PipelineQueue> callback); com.squareup.okhttp.Call getPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineRun(String organization, String pipeline, String run); ApiResponse<PipelineRun> getPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineRunLogCall(String organization, String pipeline, String run, Integer start, Boolean download, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunLog(String organization, String pipeline, String run, Integer start, Boolean download); ApiResponse<String> getPipelineRunLogWithHttpInfo(String organization, String pipeline, String run, Integer start, Boolean download); com.squareup.okhttp.Call getPipelineRunLogAsync(String organization, String pipeline, String run, Integer start, Boolean download, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNode getPipelineRunNode(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNode> getPipelineRunNodeWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNode> callback); com.squareup.okhttp.Call getPipelineRunNodeStepCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineStepImpl getPipelineRunNodeStep(String organization, String pipeline, String run, String node, String step); ApiResponse<PipelineStepImpl> getPipelineRunNodeStepWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<PipelineStepImpl> callback); com.squareup.okhttp.Call getPipelineRunNodeStepLogCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunNodeStepLog(String organization, String pipeline, String run, String node, String step); ApiResponse<String> getPipelineRunNodeStepLogWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepLogAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeStepsCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodeSteps getPipelineRunNodeSteps(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNodeSteps> getPipelineRunNodeStepsWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeStepsAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNodeSteps> callback); com.squareup.okhttp.Call getPipelineRunNodesCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodes getPipelineRunNodes(String organization, String pipeline, String run); ApiResponse<PipelineRunNodes> getPipelineRunNodesWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunNodesAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRunNodes> callback); com.squareup.okhttp.Call getPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRuns getPipelineRuns(String organization, String pipeline); ApiResponse<PipelineRuns> getPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineRunsAsync(String organization, String pipeline, final ApiCallback<PipelineRuns> callback); com.squareup.okhttp.Call getPipelinesCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipelines getPipelines(String organization); ApiResponse<Pipelines> getPipelinesWithHttpInfo(String organization); com.squareup.okhttp.Call getPipelinesAsync(String organization, final ApiCallback<Pipelines> callback); com.squareup.okhttp.Call getSCMCall(String organization, String scm, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); GithubScm getSCM(String organization, String scm); ApiResponse<GithubScm> getSCMWithHttpInfo(String organization, String scm); com.squareup.okhttp.Call getSCMAsync(String organization, String scm, final ApiCallback<GithubScm> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoriesCall(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepositories(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoriesWithHttpInfo(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); com.squareup.okhttp.Call getSCMOrganisationRepositoriesAsync(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoryCall(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepository(String organization, String scm, String scmOrganisation, String repository, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoryWithHttpInfo(String organization, String scm, String scmOrganisation, String repository, String credentialId); com.squareup.okhttp.Call getSCMOrganisationRepositoryAsync(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationsCall(String organization, String scm, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisations(String organization, String scm, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationsWithHttpInfo(String organization, String scm, String credentialId); com.squareup.okhttp.Call getSCMOrganisationsAsync(String organization, String scm, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getUserCall(String organization, String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUser(String organization, String user); ApiResponse<User> getUserWithHttpInfo(String organization, String user); com.squareup.okhttp.Call getUserAsync(String organization, String user, final ApiCallback<User> callback); com.squareup.okhttp.Call getUserFavoritesCall(String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); UserFavorites getUserFavorites(String user); ApiResponse<UserFavorites> getUserFavoritesWithHttpInfo(String user); com.squareup.okhttp.Call getUserFavoritesAsync(String user, final ApiCallback<UserFavorites> callback); com.squareup.okhttp.Call getUsersCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUsers(String organization); ApiResponse<User> getUsersWithHttpInfo(String organization); com.squareup.okhttp.Call getUsersAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call postPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRun(String organization, String pipeline, String run); ApiResponse<QueueItemImpl> postPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call postPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call postPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRuns(String organization, String pipeline); ApiResponse<QueueItemImpl> postPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call postPipelineRunsAsync(String organization, String pipeline, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call putPipelineFavoriteCall(String organization, String pipeline, Body body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); FavoriteImpl putPipelineFavorite(String organization, String pipeline, Body body); ApiResponse<FavoriteImpl> putPipelineFavoriteWithHttpInfo(String organization, String pipeline, Body body); com.squareup.okhttp.Call putPipelineFavoriteAsync(String organization, String pipeline, Body body, final ApiCallback<FavoriteImpl> callback); com.squareup.okhttp.Call putPipelineRunCall(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun putPipelineRun(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); ApiResponse<PipelineRun> putPipelineRunWithHttpInfo(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); com.squareup.okhttp.Call putPipelineRunAsync(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call searchCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String search(String q); ApiResponse<String> searchWithHttpInfo(String q); com.squareup.okhttp.Call searchAsync(String q, final ApiCallback<String> callback); com.squareup.okhttp.Call searchClassesCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String searchClasses(String q); ApiResponse<String> searchClassesWithHttpInfo(String q); com.squareup.okhttp.Call searchClassesAsync(String q, final ApiCallback<String> callback); }
@Test public void getPipelineBranchesTest() throws ApiException { String organization = null; String pipeline = null; MultibranchPipeline response = api.getPipelineBranches(organization, pipeline); }
BlueOceanApi { public PipelineFolderImpl getPipelineFolder(String organization, String folder) throws ApiException { ApiResponse<PipelineFolderImpl> resp = getPipelineFolderWithHttpInfo(organization, folder); return resp.getData(); } BlueOceanApi(); BlueOceanApi(ApiClient apiClient); ApiClient getApiClient(); void setApiClient(ApiClient apiClient); com.squareup.okhttp.Call deletePipelineQueueItemCall(String organization, String pipeline, String queue, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); void deletePipelineQueueItem(String organization, String pipeline, String queue); ApiResponse<Void> deletePipelineQueueItemWithHttpInfo(String organization, String pipeline, String queue); com.squareup.okhttp.Call deletePipelineQueueItemAsync(String organization, String pipeline, String queue, final ApiCallback<Void> callback); com.squareup.okhttp.Call getAuthenticatedUserCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getAuthenticatedUser(String organization); ApiResponse<User> getAuthenticatedUserWithHttpInfo(String organization); com.squareup.okhttp.Call getAuthenticatedUserAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call getClassesCall(String propertyClass, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getClasses(String propertyClass); ApiResponse<String> getClassesWithHttpInfo(String propertyClass); com.squareup.okhttp.Call getClassesAsync(String propertyClass, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebKeyCall(Integer key, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebKey(Integer key); ApiResponse<String> getJsonWebKeyWithHttpInfo(Integer key); com.squareup.okhttp.Call getJsonWebKeyAsync(Integer key, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebTokenCall(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebToken(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); ApiResponse<String> getJsonWebTokenWithHttpInfo(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); com.squareup.okhttp.Call getJsonWebTokenAsync(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ApiCallback<String> callback); com.squareup.okhttp.Call getOrganisationCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisation getOrganisation(String organization); ApiResponse<Organisation> getOrganisationWithHttpInfo(String organization); com.squareup.okhttp.Call getOrganisationAsync(String organization, final ApiCallback<Organisation> callback); com.squareup.okhttp.Call getOrganisationsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisations getOrganisations(); ApiResponse<Organisations> getOrganisationsWithHttpInfo(); com.squareup.okhttp.Call getOrganisationsAsync(final ApiCallback<Organisations> callback); com.squareup.okhttp.Call getPipelineCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipeline getPipeline(String organization, String pipeline); ApiResponse<Pipeline> getPipelineWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineAsync(String organization, String pipeline, final ApiCallback<Pipeline> callback); com.squareup.okhttp.Call getPipelineActivitiesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineActivities getPipelineActivities(String organization, String pipeline); ApiResponse<PipelineActivities> getPipelineActivitiesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineActivitiesAsync(String organization, String pipeline, final ApiCallback<PipelineActivities> callback); com.squareup.okhttp.Call getPipelineBranchCall(String organization, String pipeline, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); BranchImpl getPipelineBranch(String organization, String pipeline, String branch); ApiResponse<BranchImpl> getPipelineBranchWithHttpInfo(String organization, String pipeline, String branch); com.squareup.okhttp.Call getPipelineBranchAsync(String organization, String pipeline, String branch, final ApiCallback<BranchImpl> callback); com.squareup.okhttp.Call getPipelineBranchRunCall(String organization, String pipeline, String branch, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineBranchRun(String organization, String pipeline, String branch, String run); ApiResponse<PipelineRun> getPipelineBranchRunWithHttpInfo(String organization, String pipeline, String branch, String run); com.squareup.okhttp.Call getPipelineBranchRunAsync(String organization, String pipeline, String branch, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineBranchesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); MultibranchPipeline getPipelineBranches(String organization, String pipeline); ApiResponse<MultibranchPipeline> getPipelineBranchesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineBranchesAsync(String organization, String pipeline, final ApiCallback<MultibranchPipeline> callback); com.squareup.okhttp.Call getPipelineFolderCall(String organization, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineFolderImpl getPipelineFolder(String organization, String folder); ApiResponse<PipelineFolderImpl> getPipelineFolderWithHttpInfo(String organization, String folder); com.squareup.okhttp.Call getPipelineFolderAsync(String organization, String folder, final ApiCallback<PipelineFolderImpl> callback); com.squareup.okhttp.Call getPipelineFolderPipelineCall(String organization, String pipeline, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineImpl getPipelineFolderPipeline(String organization, String pipeline, String folder); ApiResponse<PipelineImpl> getPipelineFolderPipelineWithHttpInfo(String organization, String pipeline, String folder); com.squareup.okhttp.Call getPipelineFolderPipelineAsync(String organization, String pipeline, String folder, final ApiCallback<PipelineImpl> callback); com.squareup.okhttp.Call getPipelineQueueCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineQueue getPipelineQueue(String organization, String pipeline); ApiResponse<PipelineQueue> getPipelineQueueWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineQueueAsync(String organization, String pipeline, final ApiCallback<PipelineQueue> callback); com.squareup.okhttp.Call getPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineRun(String organization, String pipeline, String run); ApiResponse<PipelineRun> getPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineRunLogCall(String organization, String pipeline, String run, Integer start, Boolean download, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunLog(String organization, String pipeline, String run, Integer start, Boolean download); ApiResponse<String> getPipelineRunLogWithHttpInfo(String organization, String pipeline, String run, Integer start, Boolean download); com.squareup.okhttp.Call getPipelineRunLogAsync(String organization, String pipeline, String run, Integer start, Boolean download, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNode getPipelineRunNode(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNode> getPipelineRunNodeWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNode> callback); com.squareup.okhttp.Call getPipelineRunNodeStepCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineStepImpl getPipelineRunNodeStep(String organization, String pipeline, String run, String node, String step); ApiResponse<PipelineStepImpl> getPipelineRunNodeStepWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<PipelineStepImpl> callback); com.squareup.okhttp.Call getPipelineRunNodeStepLogCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunNodeStepLog(String organization, String pipeline, String run, String node, String step); ApiResponse<String> getPipelineRunNodeStepLogWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepLogAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeStepsCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodeSteps getPipelineRunNodeSteps(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNodeSteps> getPipelineRunNodeStepsWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeStepsAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNodeSteps> callback); com.squareup.okhttp.Call getPipelineRunNodesCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodes getPipelineRunNodes(String organization, String pipeline, String run); ApiResponse<PipelineRunNodes> getPipelineRunNodesWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunNodesAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRunNodes> callback); com.squareup.okhttp.Call getPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRuns getPipelineRuns(String organization, String pipeline); ApiResponse<PipelineRuns> getPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineRunsAsync(String organization, String pipeline, final ApiCallback<PipelineRuns> callback); com.squareup.okhttp.Call getPipelinesCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipelines getPipelines(String organization); ApiResponse<Pipelines> getPipelinesWithHttpInfo(String organization); com.squareup.okhttp.Call getPipelinesAsync(String organization, final ApiCallback<Pipelines> callback); com.squareup.okhttp.Call getSCMCall(String organization, String scm, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); GithubScm getSCM(String organization, String scm); ApiResponse<GithubScm> getSCMWithHttpInfo(String organization, String scm); com.squareup.okhttp.Call getSCMAsync(String organization, String scm, final ApiCallback<GithubScm> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoriesCall(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepositories(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoriesWithHttpInfo(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); com.squareup.okhttp.Call getSCMOrganisationRepositoriesAsync(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoryCall(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepository(String organization, String scm, String scmOrganisation, String repository, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoryWithHttpInfo(String organization, String scm, String scmOrganisation, String repository, String credentialId); com.squareup.okhttp.Call getSCMOrganisationRepositoryAsync(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationsCall(String organization, String scm, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisations(String organization, String scm, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationsWithHttpInfo(String organization, String scm, String credentialId); com.squareup.okhttp.Call getSCMOrganisationsAsync(String organization, String scm, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getUserCall(String organization, String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUser(String organization, String user); ApiResponse<User> getUserWithHttpInfo(String organization, String user); com.squareup.okhttp.Call getUserAsync(String organization, String user, final ApiCallback<User> callback); com.squareup.okhttp.Call getUserFavoritesCall(String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); UserFavorites getUserFavorites(String user); ApiResponse<UserFavorites> getUserFavoritesWithHttpInfo(String user); com.squareup.okhttp.Call getUserFavoritesAsync(String user, final ApiCallback<UserFavorites> callback); com.squareup.okhttp.Call getUsersCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUsers(String organization); ApiResponse<User> getUsersWithHttpInfo(String organization); com.squareup.okhttp.Call getUsersAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call postPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRun(String organization, String pipeline, String run); ApiResponse<QueueItemImpl> postPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call postPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call postPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRuns(String organization, String pipeline); ApiResponse<QueueItemImpl> postPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call postPipelineRunsAsync(String organization, String pipeline, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call putPipelineFavoriteCall(String organization, String pipeline, Body body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); FavoriteImpl putPipelineFavorite(String organization, String pipeline, Body body); ApiResponse<FavoriteImpl> putPipelineFavoriteWithHttpInfo(String organization, String pipeline, Body body); com.squareup.okhttp.Call putPipelineFavoriteAsync(String organization, String pipeline, Body body, final ApiCallback<FavoriteImpl> callback); com.squareup.okhttp.Call putPipelineRunCall(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun putPipelineRun(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); ApiResponse<PipelineRun> putPipelineRunWithHttpInfo(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); com.squareup.okhttp.Call putPipelineRunAsync(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call searchCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String search(String q); ApiResponse<String> searchWithHttpInfo(String q); com.squareup.okhttp.Call searchAsync(String q, final ApiCallback<String> callback); com.squareup.okhttp.Call searchClassesCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String searchClasses(String q); ApiResponse<String> searchClassesWithHttpInfo(String q); com.squareup.okhttp.Call searchClassesAsync(String q, final ApiCallback<String> callback); }
@Test public void getPipelineFolderTest() throws ApiException { String organization = null; String folder = null; PipelineFolderImpl response = api.getPipelineFolder(organization, folder); }
BlueOceanApi { public PipelineImpl getPipelineFolderPipeline(String organization, String pipeline, String folder) throws ApiException { ApiResponse<PipelineImpl> resp = getPipelineFolderPipelineWithHttpInfo(organization, pipeline, folder); return resp.getData(); } BlueOceanApi(); BlueOceanApi(ApiClient apiClient); ApiClient getApiClient(); void setApiClient(ApiClient apiClient); com.squareup.okhttp.Call deletePipelineQueueItemCall(String organization, String pipeline, String queue, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); void deletePipelineQueueItem(String organization, String pipeline, String queue); ApiResponse<Void> deletePipelineQueueItemWithHttpInfo(String organization, String pipeline, String queue); com.squareup.okhttp.Call deletePipelineQueueItemAsync(String organization, String pipeline, String queue, final ApiCallback<Void> callback); com.squareup.okhttp.Call getAuthenticatedUserCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getAuthenticatedUser(String organization); ApiResponse<User> getAuthenticatedUserWithHttpInfo(String organization); com.squareup.okhttp.Call getAuthenticatedUserAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call getClassesCall(String propertyClass, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getClasses(String propertyClass); ApiResponse<String> getClassesWithHttpInfo(String propertyClass); com.squareup.okhttp.Call getClassesAsync(String propertyClass, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebKeyCall(Integer key, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebKey(Integer key); ApiResponse<String> getJsonWebKeyWithHttpInfo(Integer key); com.squareup.okhttp.Call getJsonWebKeyAsync(Integer key, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebTokenCall(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebToken(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); ApiResponse<String> getJsonWebTokenWithHttpInfo(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); com.squareup.okhttp.Call getJsonWebTokenAsync(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ApiCallback<String> callback); com.squareup.okhttp.Call getOrganisationCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisation getOrganisation(String organization); ApiResponse<Organisation> getOrganisationWithHttpInfo(String organization); com.squareup.okhttp.Call getOrganisationAsync(String organization, final ApiCallback<Organisation> callback); com.squareup.okhttp.Call getOrganisationsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisations getOrganisations(); ApiResponse<Organisations> getOrganisationsWithHttpInfo(); com.squareup.okhttp.Call getOrganisationsAsync(final ApiCallback<Organisations> callback); com.squareup.okhttp.Call getPipelineCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipeline getPipeline(String organization, String pipeline); ApiResponse<Pipeline> getPipelineWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineAsync(String organization, String pipeline, final ApiCallback<Pipeline> callback); com.squareup.okhttp.Call getPipelineActivitiesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineActivities getPipelineActivities(String organization, String pipeline); ApiResponse<PipelineActivities> getPipelineActivitiesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineActivitiesAsync(String organization, String pipeline, final ApiCallback<PipelineActivities> callback); com.squareup.okhttp.Call getPipelineBranchCall(String organization, String pipeline, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); BranchImpl getPipelineBranch(String organization, String pipeline, String branch); ApiResponse<BranchImpl> getPipelineBranchWithHttpInfo(String organization, String pipeline, String branch); com.squareup.okhttp.Call getPipelineBranchAsync(String organization, String pipeline, String branch, final ApiCallback<BranchImpl> callback); com.squareup.okhttp.Call getPipelineBranchRunCall(String organization, String pipeline, String branch, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineBranchRun(String organization, String pipeline, String branch, String run); ApiResponse<PipelineRun> getPipelineBranchRunWithHttpInfo(String organization, String pipeline, String branch, String run); com.squareup.okhttp.Call getPipelineBranchRunAsync(String organization, String pipeline, String branch, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineBranchesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); MultibranchPipeline getPipelineBranches(String organization, String pipeline); ApiResponse<MultibranchPipeline> getPipelineBranchesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineBranchesAsync(String organization, String pipeline, final ApiCallback<MultibranchPipeline> callback); com.squareup.okhttp.Call getPipelineFolderCall(String organization, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineFolderImpl getPipelineFolder(String organization, String folder); ApiResponse<PipelineFolderImpl> getPipelineFolderWithHttpInfo(String organization, String folder); com.squareup.okhttp.Call getPipelineFolderAsync(String organization, String folder, final ApiCallback<PipelineFolderImpl> callback); com.squareup.okhttp.Call getPipelineFolderPipelineCall(String organization, String pipeline, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineImpl getPipelineFolderPipeline(String organization, String pipeline, String folder); ApiResponse<PipelineImpl> getPipelineFolderPipelineWithHttpInfo(String organization, String pipeline, String folder); com.squareup.okhttp.Call getPipelineFolderPipelineAsync(String organization, String pipeline, String folder, final ApiCallback<PipelineImpl> callback); com.squareup.okhttp.Call getPipelineQueueCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineQueue getPipelineQueue(String organization, String pipeline); ApiResponse<PipelineQueue> getPipelineQueueWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineQueueAsync(String organization, String pipeline, final ApiCallback<PipelineQueue> callback); com.squareup.okhttp.Call getPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineRun(String organization, String pipeline, String run); ApiResponse<PipelineRun> getPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineRunLogCall(String organization, String pipeline, String run, Integer start, Boolean download, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunLog(String organization, String pipeline, String run, Integer start, Boolean download); ApiResponse<String> getPipelineRunLogWithHttpInfo(String organization, String pipeline, String run, Integer start, Boolean download); com.squareup.okhttp.Call getPipelineRunLogAsync(String organization, String pipeline, String run, Integer start, Boolean download, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNode getPipelineRunNode(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNode> getPipelineRunNodeWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNode> callback); com.squareup.okhttp.Call getPipelineRunNodeStepCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineStepImpl getPipelineRunNodeStep(String organization, String pipeline, String run, String node, String step); ApiResponse<PipelineStepImpl> getPipelineRunNodeStepWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<PipelineStepImpl> callback); com.squareup.okhttp.Call getPipelineRunNodeStepLogCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunNodeStepLog(String organization, String pipeline, String run, String node, String step); ApiResponse<String> getPipelineRunNodeStepLogWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepLogAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeStepsCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodeSteps getPipelineRunNodeSteps(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNodeSteps> getPipelineRunNodeStepsWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeStepsAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNodeSteps> callback); com.squareup.okhttp.Call getPipelineRunNodesCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodes getPipelineRunNodes(String organization, String pipeline, String run); ApiResponse<PipelineRunNodes> getPipelineRunNodesWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunNodesAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRunNodes> callback); com.squareup.okhttp.Call getPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRuns getPipelineRuns(String organization, String pipeline); ApiResponse<PipelineRuns> getPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineRunsAsync(String organization, String pipeline, final ApiCallback<PipelineRuns> callback); com.squareup.okhttp.Call getPipelinesCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipelines getPipelines(String organization); ApiResponse<Pipelines> getPipelinesWithHttpInfo(String organization); com.squareup.okhttp.Call getPipelinesAsync(String organization, final ApiCallback<Pipelines> callback); com.squareup.okhttp.Call getSCMCall(String organization, String scm, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); GithubScm getSCM(String organization, String scm); ApiResponse<GithubScm> getSCMWithHttpInfo(String organization, String scm); com.squareup.okhttp.Call getSCMAsync(String organization, String scm, final ApiCallback<GithubScm> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoriesCall(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepositories(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoriesWithHttpInfo(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); com.squareup.okhttp.Call getSCMOrganisationRepositoriesAsync(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoryCall(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepository(String organization, String scm, String scmOrganisation, String repository, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoryWithHttpInfo(String organization, String scm, String scmOrganisation, String repository, String credentialId); com.squareup.okhttp.Call getSCMOrganisationRepositoryAsync(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationsCall(String organization, String scm, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisations(String organization, String scm, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationsWithHttpInfo(String organization, String scm, String credentialId); com.squareup.okhttp.Call getSCMOrganisationsAsync(String organization, String scm, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getUserCall(String organization, String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUser(String organization, String user); ApiResponse<User> getUserWithHttpInfo(String organization, String user); com.squareup.okhttp.Call getUserAsync(String organization, String user, final ApiCallback<User> callback); com.squareup.okhttp.Call getUserFavoritesCall(String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); UserFavorites getUserFavorites(String user); ApiResponse<UserFavorites> getUserFavoritesWithHttpInfo(String user); com.squareup.okhttp.Call getUserFavoritesAsync(String user, final ApiCallback<UserFavorites> callback); com.squareup.okhttp.Call getUsersCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUsers(String organization); ApiResponse<User> getUsersWithHttpInfo(String organization); com.squareup.okhttp.Call getUsersAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call postPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRun(String organization, String pipeline, String run); ApiResponse<QueueItemImpl> postPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call postPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call postPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRuns(String organization, String pipeline); ApiResponse<QueueItemImpl> postPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call postPipelineRunsAsync(String organization, String pipeline, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call putPipelineFavoriteCall(String organization, String pipeline, Body body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); FavoriteImpl putPipelineFavorite(String organization, String pipeline, Body body); ApiResponse<FavoriteImpl> putPipelineFavoriteWithHttpInfo(String organization, String pipeline, Body body); com.squareup.okhttp.Call putPipelineFavoriteAsync(String organization, String pipeline, Body body, final ApiCallback<FavoriteImpl> callback); com.squareup.okhttp.Call putPipelineRunCall(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun putPipelineRun(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); ApiResponse<PipelineRun> putPipelineRunWithHttpInfo(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); com.squareup.okhttp.Call putPipelineRunAsync(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call searchCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String search(String q); ApiResponse<String> searchWithHttpInfo(String q); com.squareup.okhttp.Call searchAsync(String q, final ApiCallback<String> callback); com.squareup.okhttp.Call searchClassesCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String searchClasses(String q); ApiResponse<String> searchClassesWithHttpInfo(String q); com.squareup.okhttp.Call searchClassesAsync(String q, final ApiCallback<String> callback); }
@Test public void getPipelineFolderPipelineTest() throws ApiException { String organization = null; String pipeline = null; String folder = null; PipelineImpl response = api.getPipelineFolderPipeline(organization, pipeline, folder); }
BlueOceanApi { public PipelineQueue getPipelineQueue(String organization, String pipeline) throws ApiException { ApiResponse<PipelineQueue> resp = getPipelineQueueWithHttpInfo(organization, pipeline); return resp.getData(); } BlueOceanApi(); BlueOceanApi(ApiClient apiClient); ApiClient getApiClient(); void setApiClient(ApiClient apiClient); com.squareup.okhttp.Call deletePipelineQueueItemCall(String organization, String pipeline, String queue, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); void deletePipelineQueueItem(String organization, String pipeline, String queue); ApiResponse<Void> deletePipelineQueueItemWithHttpInfo(String organization, String pipeline, String queue); com.squareup.okhttp.Call deletePipelineQueueItemAsync(String organization, String pipeline, String queue, final ApiCallback<Void> callback); com.squareup.okhttp.Call getAuthenticatedUserCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getAuthenticatedUser(String organization); ApiResponse<User> getAuthenticatedUserWithHttpInfo(String organization); com.squareup.okhttp.Call getAuthenticatedUserAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call getClassesCall(String propertyClass, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getClasses(String propertyClass); ApiResponse<String> getClassesWithHttpInfo(String propertyClass); com.squareup.okhttp.Call getClassesAsync(String propertyClass, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebKeyCall(Integer key, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebKey(Integer key); ApiResponse<String> getJsonWebKeyWithHttpInfo(Integer key); com.squareup.okhttp.Call getJsonWebKeyAsync(Integer key, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebTokenCall(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebToken(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); ApiResponse<String> getJsonWebTokenWithHttpInfo(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); com.squareup.okhttp.Call getJsonWebTokenAsync(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ApiCallback<String> callback); com.squareup.okhttp.Call getOrganisationCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisation getOrganisation(String organization); ApiResponse<Organisation> getOrganisationWithHttpInfo(String organization); com.squareup.okhttp.Call getOrganisationAsync(String organization, final ApiCallback<Organisation> callback); com.squareup.okhttp.Call getOrganisationsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisations getOrganisations(); ApiResponse<Organisations> getOrganisationsWithHttpInfo(); com.squareup.okhttp.Call getOrganisationsAsync(final ApiCallback<Organisations> callback); com.squareup.okhttp.Call getPipelineCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipeline getPipeline(String organization, String pipeline); ApiResponse<Pipeline> getPipelineWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineAsync(String organization, String pipeline, final ApiCallback<Pipeline> callback); com.squareup.okhttp.Call getPipelineActivitiesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineActivities getPipelineActivities(String organization, String pipeline); ApiResponse<PipelineActivities> getPipelineActivitiesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineActivitiesAsync(String organization, String pipeline, final ApiCallback<PipelineActivities> callback); com.squareup.okhttp.Call getPipelineBranchCall(String organization, String pipeline, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); BranchImpl getPipelineBranch(String organization, String pipeline, String branch); ApiResponse<BranchImpl> getPipelineBranchWithHttpInfo(String organization, String pipeline, String branch); com.squareup.okhttp.Call getPipelineBranchAsync(String organization, String pipeline, String branch, final ApiCallback<BranchImpl> callback); com.squareup.okhttp.Call getPipelineBranchRunCall(String organization, String pipeline, String branch, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineBranchRun(String organization, String pipeline, String branch, String run); ApiResponse<PipelineRun> getPipelineBranchRunWithHttpInfo(String organization, String pipeline, String branch, String run); com.squareup.okhttp.Call getPipelineBranchRunAsync(String organization, String pipeline, String branch, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineBranchesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); MultibranchPipeline getPipelineBranches(String organization, String pipeline); ApiResponse<MultibranchPipeline> getPipelineBranchesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineBranchesAsync(String organization, String pipeline, final ApiCallback<MultibranchPipeline> callback); com.squareup.okhttp.Call getPipelineFolderCall(String organization, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineFolderImpl getPipelineFolder(String organization, String folder); ApiResponse<PipelineFolderImpl> getPipelineFolderWithHttpInfo(String organization, String folder); com.squareup.okhttp.Call getPipelineFolderAsync(String organization, String folder, final ApiCallback<PipelineFolderImpl> callback); com.squareup.okhttp.Call getPipelineFolderPipelineCall(String organization, String pipeline, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineImpl getPipelineFolderPipeline(String organization, String pipeline, String folder); ApiResponse<PipelineImpl> getPipelineFolderPipelineWithHttpInfo(String organization, String pipeline, String folder); com.squareup.okhttp.Call getPipelineFolderPipelineAsync(String organization, String pipeline, String folder, final ApiCallback<PipelineImpl> callback); com.squareup.okhttp.Call getPipelineQueueCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineQueue getPipelineQueue(String organization, String pipeline); ApiResponse<PipelineQueue> getPipelineQueueWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineQueueAsync(String organization, String pipeline, final ApiCallback<PipelineQueue> callback); com.squareup.okhttp.Call getPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineRun(String organization, String pipeline, String run); ApiResponse<PipelineRun> getPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineRunLogCall(String organization, String pipeline, String run, Integer start, Boolean download, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunLog(String organization, String pipeline, String run, Integer start, Boolean download); ApiResponse<String> getPipelineRunLogWithHttpInfo(String organization, String pipeline, String run, Integer start, Boolean download); com.squareup.okhttp.Call getPipelineRunLogAsync(String organization, String pipeline, String run, Integer start, Boolean download, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNode getPipelineRunNode(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNode> getPipelineRunNodeWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNode> callback); com.squareup.okhttp.Call getPipelineRunNodeStepCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineStepImpl getPipelineRunNodeStep(String organization, String pipeline, String run, String node, String step); ApiResponse<PipelineStepImpl> getPipelineRunNodeStepWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<PipelineStepImpl> callback); com.squareup.okhttp.Call getPipelineRunNodeStepLogCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunNodeStepLog(String organization, String pipeline, String run, String node, String step); ApiResponse<String> getPipelineRunNodeStepLogWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepLogAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeStepsCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodeSteps getPipelineRunNodeSteps(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNodeSteps> getPipelineRunNodeStepsWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeStepsAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNodeSteps> callback); com.squareup.okhttp.Call getPipelineRunNodesCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodes getPipelineRunNodes(String organization, String pipeline, String run); ApiResponse<PipelineRunNodes> getPipelineRunNodesWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunNodesAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRunNodes> callback); com.squareup.okhttp.Call getPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRuns getPipelineRuns(String organization, String pipeline); ApiResponse<PipelineRuns> getPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineRunsAsync(String organization, String pipeline, final ApiCallback<PipelineRuns> callback); com.squareup.okhttp.Call getPipelinesCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipelines getPipelines(String organization); ApiResponse<Pipelines> getPipelinesWithHttpInfo(String organization); com.squareup.okhttp.Call getPipelinesAsync(String organization, final ApiCallback<Pipelines> callback); com.squareup.okhttp.Call getSCMCall(String organization, String scm, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); GithubScm getSCM(String organization, String scm); ApiResponse<GithubScm> getSCMWithHttpInfo(String organization, String scm); com.squareup.okhttp.Call getSCMAsync(String organization, String scm, final ApiCallback<GithubScm> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoriesCall(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepositories(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoriesWithHttpInfo(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); com.squareup.okhttp.Call getSCMOrganisationRepositoriesAsync(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoryCall(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepository(String organization, String scm, String scmOrganisation, String repository, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoryWithHttpInfo(String organization, String scm, String scmOrganisation, String repository, String credentialId); com.squareup.okhttp.Call getSCMOrganisationRepositoryAsync(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationsCall(String organization, String scm, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisations(String organization, String scm, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationsWithHttpInfo(String organization, String scm, String credentialId); com.squareup.okhttp.Call getSCMOrganisationsAsync(String organization, String scm, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getUserCall(String organization, String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUser(String organization, String user); ApiResponse<User> getUserWithHttpInfo(String organization, String user); com.squareup.okhttp.Call getUserAsync(String organization, String user, final ApiCallback<User> callback); com.squareup.okhttp.Call getUserFavoritesCall(String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); UserFavorites getUserFavorites(String user); ApiResponse<UserFavorites> getUserFavoritesWithHttpInfo(String user); com.squareup.okhttp.Call getUserFavoritesAsync(String user, final ApiCallback<UserFavorites> callback); com.squareup.okhttp.Call getUsersCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUsers(String organization); ApiResponse<User> getUsersWithHttpInfo(String organization); com.squareup.okhttp.Call getUsersAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call postPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRun(String organization, String pipeline, String run); ApiResponse<QueueItemImpl> postPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call postPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call postPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRuns(String organization, String pipeline); ApiResponse<QueueItemImpl> postPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call postPipelineRunsAsync(String organization, String pipeline, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call putPipelineFavoriteCall(String organization, String pipeline, Body body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); FavoriteImpl putPipelineFavorite(String organization, String pipeline, Body body); ApiResponse<FavoriteImpl> putPipelineFavoriteWithHttpInfo(String organization, String pipeline, Body body); com.squareup.okhttp.Call putPipelineFavoriteAsync(String organization, String pipeline, Body body, final ApiCallback<FavoriteImpl> callback); com.squareup.okhttp.Call putPipelineRunCall(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun putPipelineRun(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); ApiResponse<PipelineRun> putPipelineRunWithHttpInfo(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); com.squareup.okhttp.Call putPipelineRunAsync(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call searchCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String search(String q); ApiResponse<String> searchWithHttpInfo(String q); com.squareup.okhttp.Call searchAsync(String q, final ApiCallback<String> callback); com.squareup.okhttp.Call searchClassesCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String searchClasses(String q); ApiResponse<String> searchClassesWithHttpInfo(String q); com.squareup.okhttp.Call searchClassesAsync(String q, final ApiCallback<String> callback); }
@Test public void getPipelineQueueTest() throws ApiException { String organization = null; String pipeline = null; PipelineQueue response = api.getPipelineQueue(organization, pipeline); }
BlueOceanApi { public PipelineRun getPipelineRun(String organization, String pipeline, String run) throws ApiException { ApiResponse<PipelineRun> resp = getPipelineRunWithHttpInfo(organization, pipeline, run); return resp.getData(); } BlueOceanApi(); BlueOceanApi(ApiClient apiClient); ApiClient getApiClient(); void setApiClient(ApiClient apiClient); com.squareup.okhttp.Call deletePipelineQueueItemCall(String organization, String pipeline, String queue, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); void deletePipelineQueueItem(String organization, String pipeline, String queue); ApiResponse<Void> deletePipelineQueueItemWithHttpInfo(String organization, String pipeline, String queue); com.squareup.okhttp.Call deletePipelineQueueItemAsync(String organization, String pipeline, String queue, final ApiCallback<Void> callback); com.squareup.okhttp.Call getAuthenticatedUserCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getAuthenticatedUser(String organization); ApiResponse<User> getAuthenticatedUserWithHttpInfo(String organization); com.squareup.okhttp.Call getAuthenticatedUserAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call getClassesCall(String propertyClass, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getClasses(String propertyClass); ApiResponse<String> getClassesWithHttpInfo(String propertyClass); com.squareup.okhttp.Call getClassesAsync(String propertyClass, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebKeyCall(Integer key, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebKey(Integer key); ApiResponse<String> getJsonWebKeyWithHttpInfo(Integer key); com.squareup.okhttp.Call getJsonWebKeyAsync(Integer key, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebTokenCall(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebToken(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); ApiResponse<String> getJsonWebTokenWithHttpInfo(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); com.squareup.okhttp.Call getJsonWebTokenAsync(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ApiCallback<String> callback); com.squareup.okhttp.Call getOrganisationCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisation getOrganisation(String organization); ApiResponse<Organisation> getOrganisationWithHttpInfo(String organization); com.squareup.okhttp.Call getOrganisationAsync(String organization, final ApiCallback<Organisation> callback); com.squareup.okhttp.Call getOrganisationsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisations getOrganisations(); ApiResponse<Organisations> getOrganisationsWithHttpInfo(); com.squareup.okhttp.Call getOrganisationsAsync(final ApiCallback<Organisations> callback); com.squareup.okhttp.Call getPipelineCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipeline getPipeline(String organization, String pipeline); ApiResponse<Pipeline> getPipelineWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineAsync(String organization, String pipeline, final ApiCallback<Pipeline> callback); com.squareup.okhttp.Call getPipelineActivitiesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineActivities getPipelineActivities(String organization, String pipeline); ApiResponse<PipelineActivities> getPipelineActivitiesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineActivitiesAsync(String organization, String pipeline, final ApiCallback<PipelineActivities> callback); com.squareup.okhttp.Call getPipelineBranchCall(String organization, String pipeline, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); BranchImpl getPipelineBranch(String organization, String pipeline, String branch); ApiResponse<BranchImpl> getPipelineBranchWithHttpInfo(String organization, String pipeline, String branch); com.squareup.okhttp.Call getPipelineBranchAsync(String organization, String pipeline, String branch, final ApiCallback<BranchImpl> callback); com.squareup.okhttp.Call getPipelineBranchRunCall(String organization, String pipeline, String branch, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineBranchRun(String organization, String pipeline, String branch, String run); ApiResponse<PipelineRun> getPipelineBranchRunWithHttpInfo(String organization, String pipeline, String branch, String run); com.squareup.okhttp.Call getPipelineBranchRunAsync(String organization, String pipeline, String branch, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineBranchesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); MultibranchPipeline getPipelineBranches(String organization, String pipeline); ApiResponse<MultibranchPipeline> getPipelineBranchesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineBranchesAsync(String organization, String pipeline, final ApiCallback<MultibranchPipeline> callback); com.squareup.okhttp.Call getPipelineFolderCall(String organization, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineFolderImpl getPipelineFolder(String organization, String folder); ApiResponse<PipelineFolderImpl> getPipelineFolderWithHttpInfo(String organization, String folder); com.squareup.okhttp.Call getPipelineFolderAsync(String organization, String folder, final ApiCallback<PipelineFolderImpl> callback); com.squareup.okhttp.Call getPipelineFolderPipelineCall(String organization, String pipeline, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineImpl getPipelineFolderPipeline(String organization, String pipeline, String folder); ApiResponse<PipelineImpl> getPipelineFolderPipelineWithHttpInfo(String organization, String pipeline, String folder); com.squareup.okhttp.Call getPipelineFolderPipelineAsync(String organization, String pipeline, String folder, final ApiCallback<PipelineImpl> callback); com.squareup.okhttp.Call getPipelineQueueCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineQueue getPipelineQueue(String organization, String pipeline); ApiResponse<PipelineQueue> getPipelineQueueWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineQueueAsync(String organization, String pipeline, final ApiCallback<PipelineQueue> callback); com.squareup.okhttp.Call getPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineRun(String organization, String pipeline, String run); ApiResponse<PipelineRun> getPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineRunLogCall(String organization, String pipeline, String run, Integer start, Boolean download, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunLog(String organization, String pipeline, String run, Integer start, Boolean download); ApiResponse<String> getPipelineRunLogWithHttpInfo(String organization, String pipeline, String run, Integer start, Boolean download); com.squareup.okhttp.Call getPipelineRunLogAsync(String organization, String pipeline, String run, Integer start, Boolean download, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNode getPipelineRunNode(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNode> getPipelineRunNodeWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNode> callback); com.squareup.okhttp.Call getPipelineRunNodeStepCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineStepImpl getPipelineRunNodeStep(String organization, String pipeline, String run, String node, String step); ApiResponse<PipelineStepImpl> getPipelineRunNodeStepWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<PipelineStepImpl> callback); com.squareup.okhttp.Call getPipelineRunNodeStepLogCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunNodeStepLog(String organization, String pipeline, String run, String node, String step); ApiResponse<String> getPipelineRunNodeStepLogWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepLogAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeStepsCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodeSteps getPipelineRunNodeSteps(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNodeSteps> getPipelineRunNodeStepsWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeStepsAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNodeSteps> callback); com.squareup.okhttp.Call getPipelineRunNodesCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodes getPipelineRunNodes(String organization, String pipeline, String run); ApiResponse<PipelineRunNodes> getPipelineRunNodesWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunNodesAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRunNodes> callback); com.squareup.okhttp.Call getPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRuns getPipelineRuns(String organization, String pipeline); ApiResponse<PipelineRuns> getPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineRunsAsync(String organization, String pipeline, final ApiCallback<PipelineRuns> callback); com.squareup.okhttp.Call getPipelinesCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipelines getPipelines(String organization); ApiResponse<Pipelines> getPipelinesWithHttpInfo(String organization); com.squareup.okhttp.Call getPipelinesAsync(String organization, final ApiCallback<Pipelines> callback); com.squareup.okhttp.Call getSCMCall(String organization, String scm, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); GithubScm getSCM(String organization, String scm); ApiResponse<GithubScm> getSCMWithHttpInfo(String organization, String scm); com.squareup.okhttp.Call getSCMAsync(String organization, String scm, final ApiCallback<GithubScm> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoriesCall(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepositories(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoriesWithHttpInfo(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); com.squareup.okhttp.Call getSCMOrganisationRepositoriesAsync(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoryCall(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepository(String organization, String scm, String scmOrganisation, String repository, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoryWithHttpInfo(String organization, String scm, String scmOrganisation, String repository, String credentialId); com.squareup.okhttp.Call getSCMOrganisationRepositoryAsync(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationsCall(String organization, String scm, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisations(String organization, String scm, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationsWithHttpInfo(String organization, String scm, String credentialId); com.squareup.okhttp.Call getSCMOrganisationsAsync(String organization, String scm, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getUserCall(String organization, String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUser(String organization, String user); ApiResponse<User> getUserWithHttpInfo(String organization, String user); com.squareup.okhttp.Call getUserAsync(String organization, String user, final ApiCallback<User> callback); com.squareup.okhttp.Call getUserFavoritesCall(String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); UserFavorites getUserFavorites(String user); ApiResponse<UserFavorites> getUserFavoritesWithHttpInfo(String user); com.squareup.okhttp.Call getUserFavoritesAsync(String user, final ApiCallback<UserFavorites> callback); com.squareup.okhttp.Call getUsersCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUsers(String organization); ApiResponse<User> getUsersWithHttpInfo(String organization); com.squareup.okhttp.Call getUsersAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call postPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRun(String organization, String pipeline, String run); ApiResponse<QueueItemImpl> postPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call postPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call postPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRuns(String organization, String pipeline); ApiResponse<QueueItemImpl> postPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call postPipelineRunsAsync(String organization, String pipeline, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call putPipelineFavoriteCall(String organization, String pipeline, Body body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); FavoriteImpl putPipelineFavorite(String organization, String pipeline, Body body); ApiResponse<FavoriteImpl> putPipelineFavoriteWithHttpInfo(String organization, String pipeline, Body body); com.squareup.okhttp.Call putPipelineFavoriteAsync(String organization, String pipeline, Body body, final ApiCallback<FavoriteImpl> callback); com.squareup.okhttp.Call putPipelineRunCall(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun putPipelineRun(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); ApiResponse<PipelineRun> putPipelineRunWithHttpInfo(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); com.squareup.okhttp.Call putPipelineRunAsync(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call searchCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String search(String q); ApiResponse<String> searchWithHttpInfo(String q); com.squareup.okhttp.Call searchAsync(String q, final ApiCallback<String> callback); com.squareup.okhttp.Call searchClassesCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String searchClasses(String q); ApiResponse<String> searchClassesWithHttpInfo(String q); com.squareup.okhttp.Call searchClassesAsync(String q, final ApiCallback<String> callback); }
@Test public void getPipelineRunTest() throws ApiException { String organization = null; String pipeline = null; String run = null; PipelineRun response = api.getPipelineRun(organization, pipeline, run); }
BlueOceanApi { public String getPipelineRunLog(String organization, String pipeline, String run, Integer start, Boolean download) throws ApiException { ApiResponse<String> resp = getPipelineRunLogWithHttpInfo(organization, pipeline, run, start, download); return resp.getData(); } BlueOceanApi(); BlueOceanApi(ApiClient apiClient); ApiClient getApiClient(); void setApiClient(ApiClient apiClient); com.squareup.okhttp.Call deletePipelineQueueItemCall(String organization, String pipeline, String queue, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); void deletePipelineQueueItem(String organization, String pipeline, String queue); ApiResponse<Void> deletePipelineQueueItemWithHttpInfo(String organization, String pipeline, String queue); com.squareup.okhttp.Call deletePipelineQueueItemAsync(String organization, String pipeline, String queue, final ApiCallback<Void> callback); com.squareup.okhttp.Call getAuthenticatedUserCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getAuthenticatedUser(String organization); ApiResponse<User> getAuthenticatedUserWithHttpInfo(String organization); com.squareup.okhttp.Call getAuthenticatedUserAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call getClassesCall(String propertyClass, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getClasses(String propertyClass); ApiResponse<String> getClassesWithHttpInfo(String propertyClass); com.squareup.okhttp.Call getClassesAsync(String propertyClass, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebKeyCall(Integer key, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebKey(Integer key); ApiResponse<String> getJsonWebKeyWithHttpInfo(Integer key); com.squareup.okhttp.Call getJsonWebKeyAsync(Integer key, final ApiCallback<String> callback); com.squareup.okhttp.Call getJsonWebTokenCall(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getJsonWebToken(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); ApiResponse<String> getJsonWebTokenWithHttpInfo(Integer expiryTimeInMins, Integer maxExpiryTimeInMins); com.squareup.okhttp.Call getJsonWebTokenAsync(Integer expiryTimeInMins, Integer maxExpiryTimeInMins, final ApiCallback<String> callback); com.squareup.okhttp.Call getOrganisationCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisation getOrganisation(String organization); ApiResponse<Organisation> getOrganisationWithHttpInfo(String organization); com.squareup.okhttp.Call getOrganisationAsync(String organization, final ApiCallback<Organisation> callback); com.squareup.okhttp.Call getOrganisationsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Organisations getOrganisations(); ApiResponse<Organisations> getOrganisationsWithHttpInfo(); com.squareup.okhttp.Call getOrganisationsAsync(final ApiCallback<Organisations> callback); com.squareup.okhttp.Call getPipelineCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipeline getPipeline(String organization, String pipeline); ApiResponse<Pipeline> getPipelineWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineAsync(String organization, String pipeline, final ApiCallback<Pipeline> callback); com.squareup.okhttp.Call getPipelineActivitiesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineActivities getPipelineActivities(String organization, String pipeline); ApiResponse<PipelineActivities> getPipelineActivitiesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineActivitiesAsync(String organization, String pipeline, final ApiCallback<PipelineActivities> callback); com.squareup.okhttp.Call getPipelineBranchCall(String organization, String pipeline, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); BranchImpl getPipelineBranch(String organization, String pipeline, String branch); ApiResponse<BranchImpl> getPipelineBranchWithHttpInfo(String organization, String pipeline, String branch); com.squareup.okhttp.Call getPipelineBranchAsync(String organization, String pipeline, String branch, final ApiCallback<BranchImpl> callback); com.squareup.okhttp.Call getPipelineBranchRunCall(String organization, String pipeline, String branch, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineBranchRun(String organization, String pipeline, String branch, String run); ApiResponse<PipelineRun> getPipelineBranchRunWithHttpInfo(String organization, String pipeline, String branch, String run); com.squareup.okhttp.Call getPipelineBranchRunAsync(String organization, String pipeline, String branch, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineBranchesCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); MultibranchPipeline getPipelineBranches(String organization, String pipeline); ApiResponse<MultibranchPipeline> getPipelineBranchesWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineBranchesAsync(String organization, String pipeline, final ApiCallback<MultibranchPipeline> callback); com.squareup.okhttp.Call getPipelineFolderCall(String organization, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineFolderImpl getPipelineFolder(String organization, String folder); ApiResponse<PipelineFolderImpl> getPipelineFolderWithHttpInfo(String organization, String folder); com.squareup.okhttp.Call getPipelineFolderAsync(String organization, String folder, final ApiCallback<PipelineFolderImpl> callback); com.squareup.okhttp.Call getPipelineFolderPipelineCall(String organization, String pipeline, String folder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineImpl getPipelineFolderPipeline(String organization, String pipeline, String folder); ApiResponse<PipelineImpl> getPipelineFolderPipelineWithHttpInfo(String organization, String pipeline, String folder); com.squareup.okhttp.Call getPipelineFolderPipelineAsync(String organization, String pipeline, String folder, final ApiCallback<PipelineImpl> callback); com.squareup.okhttp.Call getPipelineQueueCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineQueue getPipelineQueue(String organization, String pipeline); ApiResponse<PipelineQueue> getPipelineQueueWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineQueueAsync(String organization, String pipeline, final ApiCallback<PipelineQueue> callback); com.squareup.okhttp.Call getPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun getPipelineRun(String organization, String pipeline, String run); ApiResponse<PipelineRun> getPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call getPipelineRunLogCall(String organization, String pipeline, String run, Integer start, Boolean download, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunLog(String organization, String pipeline, String run, Integer start, Boolean download); ApiResponse<String> getPipelineRunLogWithHttpInfo(String organization, String pipeline, String run, Integer start, Boolean download); com.squareup.okhttp.Call getPipelineRunLogAsync(String organization, String pipeline, String run, Integer start, Boolean download, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNode getPipelineRunNode(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNode> getPipelineRunNodeWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNode> callback); com.squareup.okhttp.Call getPipelineRunNodeStepCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineStepImpl getPipelineRunNodeStep(String organization, String pipeline, String run, String node, String step); ApiResponse<PipelineStepImpl> getPipelineRunNodeStepWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<PipelineStepImpl> callback); com.squareup.okhttp.Call getPipelineRunNodeStepLogCall(String organization, String pipeline, String run, String node, String step, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String getPipelineRunNodeStepLog(String organization, String pipeline, String run, String node, String step); ApiResponse<String> getPipelineRunNodeStepLogWithHttpInfo(String organization, String pipeline, String run, String node, String step); com.squareup.okhttp.Call getPipelineRunNodeStepLogAsync(String organization, String pipeline, String run, String node, String step, final ApiCallback<String> callback); com.squareup.okhttp.Call getPipelineRunNodeStepsCall(String organization, String pipeline, String run, String node, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodeSteps getPipelineRunNodeSteps(String organization, String pipeline, String run, String node); ApiResponse<PipelineRunNodeSteps> getPipelineRunNodeStepsWithHttpInfo(String organization, String pipeline, String run, String node); com.squareup.okhttp.Call getPipelineRunNodeStepsAsync(String organization, String pipeline, String run, String node, final ApiCallback<PipelineRunNodeSteps> callback); com.squareup.okhttp.Call getPipelineRunNodesCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRunNodes getPipelineRunNodes(String organization, String pipeline, String run); ApiResponse<PipelineRunNodes> getPipelineRunNodesWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call getPipelineRunNodesAsync(String organization, String pipeline, String run, final ApiCallback<PipelineRunNodes> callback); com.squareup.okhttp.Call getPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRuns getPipelineRuns(String organization, String pipeline); ApiResponse<PipelineRuns> getPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call getPipelineRunsAsync(String organization, String pipeline, final ApiCallback<PipelineRuns> callback); com.squareup.okhttp.Call getPipelinesCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); Pipelines getPipelines(String organization); ApiResponse<Pipelines> getPipelinesWithHttpInfo(String organization); com.squareup.okhttp.Call getPipelinesAsync(String organization, final ApiCallback<Pipelines> callback); com.squareup.okhttp.Call getSCMCall(String organization, String scm, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); GithubScm getSCM(String organization, String scm); ApiResponse<GithubScm> getSCMWithHttpInfo(String organization, String scm); com.squareup.okhttp.Call getSCMAsync(String organization, String scm, final ApiCallback<GithubScm> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoriesCall(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepositories(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoriesWithHttpInfo(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber); com.squareup.okhttp.Call getSCMOrganisationRepositoriesAsync(String organization, String scm, String scmOrganisation, String credentialId, Integer pageSize, Integer pageNumber, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationRepositoryCall(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisationRepository(String organization, String scm, String scmOrganisation, String repository, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationRepositoryWithHttpInfo(String organization, String scm, String scmOrganisation, String repository, String credentialId); com.squareup.okhttp.Call getSCMOrganisationRepositoryAsync(String organization, String scm, String scmOrganisation, String repository, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getSCMOrganisationsCall(String organization, String scm, String credentialId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); ScmOrganisations getSCMOrganisations(String organization, String scm, String credentialId); ApiResponse<ScmOrganisations> getSCMOrganisationsWithHttpInfo(String organization, String scm, String credentialId); com.squareup.okhttp.Call getSCMOrganisationsAsync(String organization, String scm, String credentialId, final ApiCallback<ScmOrganisations> callback); com.squareup.okhttp.Call getUserCall(String organization, String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUser(String organization, String user); ApiResponse<User> getUserWithHttpInfo(String organization, String user); com.squareup.okhttp.Call getUserAsync(String organization, String user, final ApiCallback<User> callback); com.squareup.okhttp.Call getUserFavoritesCall(String user, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); UserFavorites getUserFavorites(String user); ApiResponse<UserFavorites> getUserFavoritesWithHttpInfo(String user); com.squareup.okhttp.Call getUserFavoritesAsync(String user, final ApiCallback<UserFavorites> callback); com.squareup.okhttp.Call getUsersCall(String organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); User getUsers(String organization); ApiResponse<User> getUsersWithHttpInfo(String organization); com.squareup.okhttp.Call getUsersAsync(String organization, final ApiCallback<User> callback); com.squareup.okhttp.Call postPipelineRunCall(String organization, String pipeline, String run, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRun(String organization, String pipeline, String run); ApiResponse<QueueItemImpl> postPipelineRunWithHttpInfo(String organization, String pipeline, String run); com.squareup.okhttp.Call postPipelineRunAsync(String organization, String pipeline, String run, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call postPipelineRunsCall(String organization, String pipeline, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); QueueItemImpl postPipelineRuns(String organization, String pipeline); ApiResponse<QueueItemImpl> postPipelineRunsWithHttpInfo(String organization, String pipeline); com.squareup.okhttp.Call postPipelineRunsAsync(String organization, String pipeline, final ApiCallback<QueueItemImpl> callback); com.squareup.okhttp.Call putPipelineFavoriteCall(String organization, String pipeline, Body body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); FavoriteImpl putPipelineFavorite(String organization, String pipeline, Body body); ApiResponse<FavoriteImpl> putPipelineFavoriteWithHttpInfo(String organization, String pipeline, Body body); com.squareup.okhttp.Call putPipelineFavoriteAsync(String organization, String pipeline, Body body, final ApiCallback<FavoriteImpl> callback); com.squareup.okhttp.Call putPipelineRunCall(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); PipelineRun putPipelineRun(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); ApiResponse<PipelineRun> putPipelineRunWithHttpInfo(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs); com.squareup.okhttp.Call putPipelineRunAsync(String organization, String pipeline, String run, String blocking, Integer timeOutInSecs, final ApiCallback<PipelineRun> callback); com.squareup.okhttp.Call searchCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String search(String q); ApiResponse<String> searchWithHttpInfo(String q); com.squareup.okhttp.Call searchAsync(String q, final ApiCallback<String> callback); com.squareup.okhttp.Call searchClassesCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener); String searchClasses(String q); ApiResponse<String> searchClassesWithHttpInfo(String q); com.squareup.okhttp.Call searchClassesAsync(String q, final ApiCallback<String> callback); }
@Test public void getPipelineRunLogTest() throws ApiException { String organization = null; String pipeline = null; String run = null; Integer start = null; Boolean download = null; String response = api.getPipelineRunLog(organization, pipeline, run, start, download); }