Example usage for java.lang AssertionError AssertionError

List of usage examples for java.lang AssertionError AssertionError

Introduction

In this page you can find the example usage for java.lang AssertionError AssertionError.

Prototype

public AssertionError() 

Source Link

Document

Constructs an AssertionError with no detail message.

Usage

From source file:com.alexshabanov.springrestapi.support.ProfileController.java

@RequestMapping(value = PROFILE_RESOURCE, method = RequestMethod.PUT)
@ResponseBody/*from   w w  w  . ja  va  2 s.  c  o  m*/
public void putQueryParam(@RequestParam(value = "a", required = false) Long a,
        @RequestParam(value = "b", required = false) Long b, @RequestParam("c") int c) {
    throw new AssertionError(); // should be mocked
}

From source file:org.n52.sos.service.it.MockHttpResponse.java

@Override
public Element asNode() {
    InputStream in = null;/*from w  ww .  j a v a2 s.  c  om*/
    try {
        in = asInputStream();
        return this.factory.newDocumentBuilder().parse(in).getDocumentElement();
    } catch (ParserConfigurationException ex) {
        // FIXME message
        throw new AssertionError();
    } catch (SAXException ex) {
        // FIXME message
        throw new AssertionError();
    } catch (IOException ex) {
        // FIXME message
        throw new AssertionError();
    } finally {
        if (in != null) {
            try {
                in.close();
            } catch (IOException e) {
            }
        }
    }
}

From source file:com.wickettasks.business.services.user.TestUserService.java

@SuppressWarnings("null")
public void testAddExistingUser() {
    User user = null;/*www  .j av a2  s  .c om*/
    try {
        user = this.userService.add("test@email.com", "password");
    } catch (ExistingUserException e) {
        throw new AssertionError();
    }
    assertEquals(Boolean.TRUE, Boolean.valueOf(user != null));
    assertEquals(Boolean.TRUE, Boolean.valueOf("password".equals(user.getPassword())));
    assertEquals(Boolean.TRUE, Boolean.valueOf("test@email.com".equals(user.getEmail())));
}

From source file:org.callimachusproject.rewrite.MissingAdviceFactory.java

private StatusLine getStatusLine(Method method) {
    if (method.isAnnotationPresent(disabled.class)) {
        String[] phrase = method.getAnnotation(disabled.class).value();
        if (phrase.length < 1) {
            phrase = new String[] { "Disabled" };
        }/* w  ww  . ja  v  a  2s.co  m*/
        return new BasicStatusLine(HttpVersion.HTTP_1_1, 404, phrase[0]);
    }
    if (method.isAnnotationPresent(deleted.class)) {
        String[] phrase = method.getAnnotation(deleted.class).value();
        if (phrase.length < 1) {
            phrase = new String[] { "Deleted" };
        }
        return new BasicStatusLine(HttpVersion.HTTP_1_1, 410, phrase[0]);
    }
    throw new AssertionError();
}

From source file:com.microsoft.services.msa.RefreshAccessTokenRequest.java

public RefreshAccessTokenRequest(final HttpClient client, final String clientId, final String refreshToken,
        final String scope, final OAuthConfig oAuthConfig) {
    super(client, clientId, oAuthConfig);

    if (refreshToken == null)
        throw new AssertionError();
    if (TextUtils.isEmpty(refreshToken))
        throw new AssertionError();
    if (scope == null)
        throw new AssertionError();
    if (TextUtils.isEmpty(scope))
        throw new AssertionError();

    this.refreshToken = refreshToken;
    this.scope = scope;
}

From source file:net.lmxm.ute.utils.FileSystemTargetUtils.java

/**
 * Instantiates a new file system target utils.
 */
private FileSystemTargetUtils() {
    throw new AssertionError();
}

From source file:com.nabla.project.visma.House.java

public House() {
    throw new AssertionError();
}

From source file:facebook4j.internal.util.z_F4JInternalParseUtil.java

private z_F4JInternalParseUtil() {
    // should never be instantiated
    throw new AssertionError();
}

From source file:me.ixfan.wechatkit.util.HttpClientUtil.java

private HttpClientUtil() {
    throw new AssertionError();
}