Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
Removed @AfterInitialization annotation. This was announced with v0.9…
Browse files Browse the repository at this point in the history
….9 and is done in favor of using Java's @PostConstruct annotation which is intended to be used in exactly the circumstance we were using @AfterInitialization.
  • Loading branch information
slu-it committed Nov 16, 2015
1 parent 49d5831 commit ea5c21c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 43 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.FindBys;

import info.novatec.testit.webtester.api.annotations.AfterInitialization;
import info.novatec.testit.webtester.api.annotations.IdentifyUsing;
import info.novatec.testit.webtester.api.annotations.Visible;
import info.novatec.testit.webtester.api.pageobjects.PageObjectFactory;
Expand Down Expand Up @@ -87,8 +86,7 @@ public UnsupportedFieldClassException(String message) {

/**
* This exception is thrown in case anything goes wrong (exception is thrown) when executing
* a post construct method (annotated with {@link PostConstruct @PostConstruct}
* or {@link AfterInitialization @AfterInitialization}).
* a post construct method (annotated with {@link PostConstruct @PostConstruct}.
*
* @since 0.9.9
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import info.novatec.testit.webtester.api.annotations.AfterInitialization;
import info.novatec.testit.webtester.api.annotations.IdentifyUsing;
import info.novatec.testit.webtester.api.annotations.Internal;
import info.novatec.testit.webtester.api.annotations.Visible;
Expand Down Expand Up @@ -223,7 +222,7 @@ private <T extends PageObject> void tryToInvokePostConstructMethod(T pageInstanc
}

private boolean shouldExecuteMethod(Method method) {
return method.getAnnotation(PostConstruct.class) != null || method.getAnnotation(AfterInitialization.class) != null;
return method.getAnnotation(PostConstruct.class) != null;
}

private <T extends PageObject> void checkVisibilityOfAnnotatedFields(T pageInstance, Class<T> pageClazz) {
Expand Down

0 comments on commit ea5c21c

Please sign in to comment.