Package net.thucydides.core.annotations

Examples of net.thucydides.core.annotations.NotImplementedException


    private final Class<?> implementerClass;
    private final long timeoutInMilliseconds;
   
    private Class<?> getImplementer(Class<?> interfaceType) {
      if (!interfaceType.isInterface()){
        throw new NotImplementedException(interfaceType.getSimpleName() +
            " is not an interface");
      }
      ImplementedBy implBy = interfaceType.getAnnotation(ImplementedBy.class);
      if (implBy == null){
        throw new NotImplementedException(interfaceType.getSimpleName() +
            " is not implemented by any class (or not annotated by @ImplementedBy)");
      }
      Class<?> implementerClass = implBy.value();
      if (!interfaceType.isAssignableFrom(implementerClass)) {
        throw new NotImplementedException("implementer Class does not implement the interface " + interfaceType.getName());
      }
      return implementerClass;
    }
View Full Code Here


    public SmartElementHandler(Class<?> interfaceType, ElementLocator locator,
      WebDriver driver, long timeoutInMilliseconds) {
      this.driver = driver;
        this.locator = locator;
        if (!WebElementFacade.class.isAssignableFrom(interfaceType)) {
            throw new NotImplementedException("interface not assignable to WebElementFacade");
        }
       
        this.implementerClass = getImplementer(interfaceType);
        this.timeoutInMilliseconds = timeoutInMilliseconds;
    }
View Full Code Here

TOP

Related Classes of net.thucydides.core.annotations.NotImplementedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.