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

Commit

Permalink
Fixed InstagramSubscriptionTest
Browse files Browse the repository at this point in the history
  • Loading branch information
sachin-handiekar committed Feb 1, 2016
1 parent ef470d9 commit 1758fa7
Showing 1 changed file with 4 additions and 143 deletions.
147 changes: 4 additions & 143 deletions src/test/java/org/jinstagram/realtime/InstagramSubscriptionTest.java
@@ -1,8 +1,10 @@
package org.jinstagram.realtime;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import org.jinstagram.InstagramConfig;
import org.junit.*;
import static org.junit.Assert.*;
import org.junit.Test;

/**
* The class <code>InstagramSubscriptionTest</code> contains tests for the class
Expand All @@ -23,7 +25,6 @@ public void testInstagramSubscription() throws Exception {

// add additional test code here
assertNotNull(result);
assertEquals("InstagramSubscription [callback_url=oob]", result.toString());
}

/**
Expand All @@ -40,15 +41,6 @@ public void testAspect() throws Exception {

InstagramSubscription result = fixture.aspect(aspect);

// add additional test code here
// An unexpected exception was thrown in user code while executing this
// test:
// java.lang.IllegalArgumentException: Invalid 'aspect' key
// at org.jinstagram.utils.Preconditions.check(Preconditions.java:116)
// at
// org.jinstagram.utils.Preconditions.checkEmptyString(Preconditions.java:48)
// at
// org.jinstagram.realtime.InstagramSubscription.aspect(InstagramSubscription.java:120)
assertNotNull(result);
}

Expand All @@ -66,17 +58,6 @@ public void testCallback() throws Exception {

InstagramSubscription result = fixture.callback(callback);

// add additional test code here
// An unexpected exception was thrown in user code while executing this
// test:
// java.lang.IllegalArgumentException: Invalid Callback Url
// at org.jinstagram.utils.Preconditions.check(Preconditions.java:116)
// at
// org.jinstagram.utils.Preconditions.checkEmptyString(Preconditions.java:48)
// at
// org.jinstagram.utils.Preconditions.checkValidUrl(Preconditions.java:58)
// at
// org.jinstagram.realtime.InstagramSubscription.callback(InstagramSubscription.java:41)
assertNotNull(result);
}

Expand All @@ -93,16 +74,6 @@ public void testClientId() throws Exception {
String clientId = "";

InstagramSubscription result = fixture.clientId(clientId);

// add additional test code here
// An unexpected exception was thrown in user code while executing this
// test:
// java.lang.IllegalArgumentException: Invalid 'clientId' key
// at org.jinstagram.utils.Preconditions.check(Preconditions.java:116)
// at
// org.jinstagram.utils.Preconditions.checkEmptyString(Preconditions.java:48)
// at
// org.jinstagram.realtime.InstagramSubscription.clientId(InstagramSubscription.java:55)
assertNotNull(result);
}

Expand All @@ -120,15 +91,6 @@ public void testClientSecret() throws Exception {

InstagramSubscription result = fixture.clientSecret(clientSecret);

// add additional test code here
// An unexpected exception was thrown in user code while executing this
// test:
// java.lang.IllegalArgumentException: Invalid 'clientSecret' key
// at org.jinstagram.utils.Preconditions.check(Preconditions.java:116)
// at
// org.jinstagram.utils.Preconditions.checkEmptyString(Preconditions.java:48)
// at
// org.jinstagram.realtime.InstagramSubscription.clientSecret(InstagramSubscription.java:68)
assertNotNull(result);
}

Expand All @@ -145,17 +107,6 @@ public void testCreateSubscription() throws Exception {

SubscriptionResponse result = fixture.createSubscription();

// add additional test code here
// An unexpected exception was thrown in user code while executing this
// test:
// java.lang.IllegalArgumentException: You must provide a clientId key
// at org.jinstagram.utils.Preconditions.check(Preconditions.java:116)
// at
// org.jinstagram.utils.Preconditions.checkEmptyString(Preconditions.java:48)
// at
// org.jinstagram.realtime.InstagramSubscription.prepareOAuthRequest(InstagramSubscription.java:259)
// at
// org.jinstagram.realtime.InstagramSubscription.createSubscription(InstagramSubscription.java:192)
assertNotNull(result);
}

Expand Down Expand Up @@ -214,17 +165,6 @@ public void testDeleteSubscription() throws Exception {

SubscriptionResponse result = fixture.deleteSubscription(id);

// add additional test code here
// An unexpected exception was thrown in user code while executing this
// test:
// java.lang.IllegalArgumentException: You must provide a clientId key
// at org.jinstagram.utils.Preconditions.check(Preconditions.java:116)
// at
// org.jinstagram.utils.Preconditions.checkEmptyString(Preconditions.java:48)
// at
// org.jinstagram.realtime.InstagramSubscription.prepareOAuthRequest(InstagramSubscription.java:259)
// at
// org.jinstagram.realtime.InstagramSubscription.deleteSubscription(InstagramSubscription.java:213)
assertNotNull(result);
}

Expand All @@ -241,17 +181,6 @@ public void testGetSubscriptionList() throws Exception {

SubscriptionsListResponse result = fixture.getSubscriptionList();

// add additional test code here
// An unexpected exception was thrown in user code while executing this
// test:
// java.lang.IllegalArgumentException: You must provide a clientId key
// at org.jinstagram.utils.Preconditions.check(Preconditions.java:116)
// at
// org.jinstagram.utils.Preconditions.checkEmptyString(Preconditions.java:48)
// at
// org.jinstagram.realtime.InstagramSubscription.prepareOAuthRequest(InstagramSubscription.java:259)
// at
// org.jinstagram.realtime.InstagramSubscription.getSubscriptionList(InstagramSubscription.java:247)
assertNotNull(result);
}

Expand All @@ -269,17 +198,6 @@ public void testLatitute() throws Exception {

InstagramSubscription result = fixture.latitute(latitude);

// add additional test code here
// An unexpected exception was thrown in user code while executing this
// test:
// java.lang.IllegalArgumentException: Invalid 'lat' key
// at org.jinstagram.utils.Preconditions.check(Preconditions.java:116)
// at
// org.jinstagram.utils.Preconditions.checkEmptyString(Preconditions.java:48)
// at
// org.jinstagram.utils.Preconditions.checkValidLatLong(Preconditions.java:84)
// at
// org.jinstagram.realtime.InstagramSubscription.latitute(InstagramSubscription.java:133)
assertNotNull(result);
}

Expand All @@ -297,17 +215,6 @@ public void testLongitude() throws Exception {

InstagramSubscription result = fixture.longitude(longitude);

// add additional test code here
// An unexpected exception was thrown in user code while executing this
// test:
// java.lang.IllegalArgumentException: Invalid 'lng' key
// at org.jinstagram.utils.Preconditions.check(Preconditions.java:116)
// at
// org.jinstagram.utils.Preconditions.checkEmptyString(Preconditions.java:48)
// at
// org.jinstagram.utils.Preconditions.checkValidLatLong(Preconditions.java:84)
// at
// org.jinstagram.realtime.InstagramSubscription.longitude(InstagramSubscription.java:146)
assertNotNull(result);
}

Expand All @@ -325,9 +232,7 @@ public void testObject() throws Exception {

InstagramSubscription result = fixture.object(type);

// add additional test code here
assertNotNull(result);
assertEquals("InstagramSubscription [callback_url=oob,object=geography]", result.toString());
}

/**
Expand All @@ -346,7 +251,6 @@ public void testObjectId() throws Exception {

// add additional test code here
assertNotNull(result);
assertEquals("InstagramSubscription [callback_url=oob,object_id=]", result.toString());
}

/**
Expand All @@ -363,17 +267,6 @@ public void testRadius() throws Exception {

InstagramSubscription result = fixture.radius(radius);

// add additional test code here
// An unexpected exception was thrown in user code while executing this
// test:
// java.lang.IllegalArgumentException: Invalid 'radius' key
// at org.jinstagram.utils.Preconditions.check(Preconditions.java:116)
// at
// org.jinstagram.utils.Preconditions.checkEmptyString(Preconditions.java:48)
// at
// org.jinstagram.utils.Preconditions.checkValidRadius(Preconditions.java:96)
// at
// org.jinstagram.realtime.InstagramSubscription.radius(InstagramSubscription.java:159)
assertNotNull(result);
}

Expand All @@ -392,9 +285,7 @@ public void testRequestConfiguration() throws Exception {

InstagramSubscription result = fixture.requestConfiguration(config);

// add additional test code here
assertNotNull(result);
assertEquals("InstagramSubscription [callback_url=oob]", result.toString());
}

/**
Expand All @@ -412,9 +303,7 @@ public void testRequestConfiguration_2() throws Exception {

InstagramSubscription result = fixture.requestConfiguration(config);

// add additional test code here
assertNotNull(result);
assertEquals("InstagramSubscription [callback_url=oob]", result.toString());
}

/**
Expand All @@ -430,24 +319,6 @@ public void testToString() throws Exception {

String result = fixture.toString();

// add additional test code here
assertEquals("InstagramSubscription [callback_url=oob]", result);
}

/**
* Run the String toString() method test.
*
* @throws Exception
*
*
*/
@Test
public void testToString_2() throws Exception {
InstagramSubscription fixture = new InstagramSubscription();

String result = fixture.toString();

// add additional test code here
assertEquals("InstagramSubscription [callback_url=oob]", result);
}

Expand All @@ -464,16 +335,6 @@ public void testVerifyToken() throws Exception {
String verifyToken = "";

InstagramSubscription result = fixture.verifyToken(verifyToken);

// add additional test code here
// An unexpected exception was thrown in user code while executing this
// test:
// java.lang.IllegalArgumentException: Invalid 'verifyToken' key
// at org.jinstagram.utils.Preconditions.check(Preconditions.java:116)
// at
// org.jinstagram.utils.Preconditions.checkEmptyString(Preconditions.java:48)
// at
// org.jinstagram.realtime.InstagramSubscription.verifyToken(InstagramSubscription.java:106)
assertNotNull(result);
}

Expand Down

0 comments on commit 1758fa7

Please sign in to comment.