IntelligentDoSLibraryImpl implements IntelligentDoSLibrary { @Override public boolean hasFurtherAttack() { return hasFurtherAttack; } IntelligentDoSLibraryImpl( String xmlMessage, PositionIterator positionIterator ); @Override void initialize(); static DoSAttack[] getAllAttacks(); @Override void setAttacks( DoSAttack[] attacks ); void setSuccessDecider( SuccessDecider successDecider ); void setCommonParams( List<CommonParamItem> commonParamList ); void setServerRecoveryTime( int timeInMillies ); @Override boolean hasFurtherAttack(); @Override synchronized AttackModel nextAttack(); @Override synchronized void update( AttackModel attackModel ); @Override void updateTestProbes( Metric metric ); @Override List<SuccessfulAttack> getSuccessfulAttacks(); @Override List<DoSAttack> getNotPossible(); @Override List<Threshold> getThresholds(); @Override boolean wasSuccessful(); @Override String getTestProbeContent(); Long[] getCurrentUntampered(); @Override double getMaximumRequestsPerSecond(); static IDoSBuilder create(); static final int DEFAULT_SERVER_RECOVERY; static final List<CommonParamItem> COMMONPARAMS; }
@Test public void hasFurtherAttackTest() { assertThat( impl.hasFurtherAttack(), is( true ) ); }
@Test public void hasNoFurtherAttacks() { String xmlMessage2 = "<?xml version=\"1.0\"?><Envelope><Header></Header><Body></Body></Envelope>"; PositionIterator positionIterator = new SchemaAnalyzerPositionIterator( schemaAnalyzer, xmlMessage2 ); IntelligentDoSLibraryImpl iDoSLibrary = new IntelligentDoSLibraryImpl( xmlMessage2, positionIterator ); assertThat( iDoSLibrary.hasFurtherAttack(), is( false ) ); }