Search in sources :

Example 1 with CommentValidator

use of com.google.gerrit.extensions.validators.CommentValidator in project gerrit by GerritCodeReview.

the class PostReviewIT method createModule.

@Override
public Module createModule() {
    return new FactoryModule() {

        @Override
        public void configure() {
            CommentValidator mockCommentValidator = mock(CommentValidator.class);
            bind(CommentValidator.class).annotatedWith(Exports.named(mockCommentValidator.getClass())).toInstance(mockCommentValidator);
            bind(CommentValidator.class).toInstance(mockCommentValidator);
        }
    };
}
Also used : CommentValidator(com.google.gerrit.extensions.validators.CommentValidator) FactoryModule(com.google.gerrit.extensions.config.FactoryModule)

Example 2 with CommentValidator

use of com.google.gerrit.extensions.validators.CommentValidator in project gerrit by GerritCodeReview.

the class ReceiveCommitsCommentValidationIT method createModule.

@Override
public Module createModule() {
    return new FactoryModule() {

        @Override
        public void configure() {
            CommentValidator mockCommentValidator = mock(CommentValidator.class);
            bind(CommentValidator.class).annotatedWith(Exports.named(mockCommentValidator.getClass())).toInstance(mockCommentValidator);
            bind(CommentValidator.class).toInstance(mockCommentValidator);
        }
    };
}
Also used : CommentValidator(com.google.gerrit.extensions.validators.CommentValidator) FactoryModule(com.google.gerrit.extensions.config.FactoryModule)

Aggregations

FactoryModule (com.google.gerrit.extensions.config.FactoryModule)2 CommentValidator (com.google.gerrit.extensions.validators.CommentValidator)2