Permalink
Browse files

Core 3.4 in monomac and monotouch

  • Loading branch information...
1 parent c88d2b6 commit 1863155bd09dcb137199a930d1936e1122e7a4b3 @crimsonred crimsonred committed Mar 7, 2013

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,19 +1,21 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
- <MonoDevelop.Ide.Workbench ActiveDocument="PubNubTest/PubnubUnitTest.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="PubNub-Console/Pubnub.cs">
<Files>
- <File FileName="PubNub-Console/Pubnub.cs" Line="2569" Column="14" />
- <File FileName="PubNubTest/WhenSubscribedToAChannel.cs" Line="360" Column="29" />
- <File FileName="PubNubTest/PubnubUnitTest.cs" Line="10" Column="6" />
- <File FileName="PubNubTest/WhenDetailedHistoryIsRequested.cs" Line="43" Column="14" />
+ <File FileName="PubNub-Console/Pubnub.cs" Line="4049" Column="16" />
+ <File FileName="PubNubTest/WhenAClientIsPresented.cs" Line="142" Column="10" />
+ <File FileName="PubNubTest/PubnubUnitTest.cs" Line="21" Column="16" />
+ <File FileName="PubNub-Console/PubnubExample.cs" Line="223" Column="6" />
+ <File FileName="PubNubTest/Common.cs" Line="37" Column="47" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State expanded="True">
- <Node name="PubNub-Messaging" expanded="True" />
+ <Node name="PubNub-Messaging" expanded="True">
+ <Node name="Pubnub.cs" selected="True" />
+ </Node>
<Node name="PubNub-Messaging.Tests" expanded="True">
<Node name="References" expanded="True" />
- <Node name="PubnubUnitTest.cs" selected="True" />
</Node>
</State>
</Pad>
@@ -42,12 +44,12 @@
<Node name="PubNub-Messaging.Tests" expanded="True">
<Node name="PubNubMessaging" expanded="True">
<Node name="Tests" expanded="True">
- <Node name="WhenAClientIsPresented" expanded="True" />
+ <Node name="WhenAClientIsPresented" expanded="True">
+ <Node name="ThenPresenceShouldReturnCustomUUID" selected="True" />
+ </Node>
<Node name="WhenAMessageIsPublished" expanded="True" />
- <Node name="WhenDetailedHistoryIsRequested" selected="True" />
- <Node name="WhenGetRequestServerTime" expanded="True" />
+ <Node name="WhenDetailedHistoryIsRequested" expanded="True" />
<Node name="WhenSubscribedToAChannel" expanded="True" />
- <Node name="WhenUnsubscribedToAChannel" expanded="True" />
</Node>
</Node>
</Node>
@@ -59,7 +61,11 @@
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
- <BreakpointStore />
+ <BreakpointStore>
+ <Breakpoint file="/Volumes/Macintosh/Users/rajatkalsy/Projects/Client/ODesk/pubnub/mono-mac-new copy/3.3.0.1/PubNub-Messaging/PubNub-Console/Pubnub.cs" line="1301" />
+ <Breakpoint file="/Volumes/Macintosh/Users/rajatkalsy/Projects/Client/ODesk/pubnub/mono-mac-new copy/3.3.0.1/PubNub-Messaging/PubNubTest/Common.cs" line="29" />
+ <Breakpoint file="/Volumes/Macintosh/Users/rajatkalsy/Projects/Client/ODesk/pubnub/mono-mac-new copy/3.3.0.1/PubNub-Messaging/PubNub-Console/Pubnub.cs" line="1504" />
+ </BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches>
<Watch file="PubNub-Messaging/Pubnub.cs" line="549" offsetX="648" offsetY="6960" expression="result" liveUpdate="False" />
@@ -21,7 +21,7 @@ public PubnubUnitTest CreateUnitTestInstance(string testClassName, string testCa
public void DisplayReturnMessageDummy(object result)
{
//deliveryStatus = true;
- Response = result;
+ //Response = result;
}
public void DisplayReturnMessage(object result)
@@ -40,7 +40,6 @@
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Web" />
- <Reference Include="Mono.WebBrowser" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
@@ -471,12 +471,14 @@ public bool EnableStubTest
data.Add("/subscribe/demo/hello_world/0/13559006802662768", "[[\"f7wNXpx8Ys8pVJNR5ZHT9g==\"],\"13559014566792816\"]");
data.Add("/subscribe/demo/hello_world/0/13559014566792816", "[[],\"13559014566792816\"]");
#else
- data.Add("/subscribe/demo/hello_world-pnpres/0/0", "[[],\"13559007117760880\"]");
- data.Add("/subscribe/demo/hello_world-pnpres,hello_world/0/0", "[[{\"action\": \"join\", \"timestamp\": 1355929955, \"uuid\": \"CustomSessionUUIDTest\", \"occupancy\": 1}],\"13559011560379628\"]");
- data.Add("/subscribe/demo/hello_world-pnpres/0/13559011560379628", "[[],\"13559011560379628\"]");
- data.Add("/subscribe/demo/hello_world/0/0", "[[],\"13559006802662768\"]");
- data.Add("/subscribe/demo/hello_world/0/13559006802662768", "[[\"demo test for stubs\"],\"13559014566792816\"]");
- data.Add("/subscribe/demo/hello_world/0/13559014566792816", "[[],\"13559014566792816\"]");
+ data.Add("/subscribe/demo/hello_world-pnpres/0/0", "[[],\"13559007117760880\"]");
+ data.Add("/v2/presence/sub_key/demo/channel/hello_world", "{\"uuids\":[\"1b31e299-0c55-4e0b-b1da-04243dd1b4aa\",\"CustomSessionUUIDTest\"],\"occupancy\":2}");
+ data.Add("/subscribe/demo/hello_world/0/0", "[[],\"13559011560379628\"]");
+ data.Add("/subscribe/demo/hello_world/0/13559011560379628", "[[],\"13559014566792816\"]");
+ data.Add("/subscribe/demo/hello_world/0/13559007117760880", "[[{\"action\": \"join\", \"timestamp\": 1355929955, \"uuid\": \"CustomSessionUUIDTest\", \"occupancy\": 1}],\"13559011560379628\"]");
+ data.Add("/subscribe/demo/hello_world/0/13559006802662768", "[[\"f7wNXpx8Ys8pVJNR5ZHT9g==\"],\"13559014566792816\"]");
+ data.Add("/subscribe/demo/hello_world/0/13559014566792816", "[[],\"13559014566792816\"]");
+
#endif
data.Add("/v2/presence/sub_key/demo/channel/hello_world/leave", "{\"action\": \"leave\"}");
return data;
@@ -141,41 +141,33 @@ public void ThenPresenceShouldReturnCustomUUID()
{
Pubnub pubnub = new Pubnub("demo", "demo", "", "", false);
- Common common = new Common();
- common.DeliveryStatus = false;
- common.Response = null;
+ Common commonHereNow = new Common();
+ commonHereNow.DeliveryStatus = false;
+ commonHereNow.Response = null;
- pubnub.PubnubUnitTest = common.CreateUnitTestInstance("WhenAClientIsPresented", "ThenPresenceShouldReturnCustomUUID");;
+ Common commonSubscribe = new Common();
+ commonSubscribe.DeliveryStatus = false;
+ commonSubscribe.Response = null;
+
+ pubnub.PubnubUnitTest = commonHereNow.CreateUnitTestInstance("WhenAClientIsPresented", "ThenPresenceShouldReturnCustomUUID");;
pubnub.SessionUUID = "CustomSessionUUIDTest";
string channel = "hello_world";
- pubnub.Presence(channel, common.DisplayReturnMessageDummy, common.DisplayReturnMessageDummy);
-
- pubnub.Subscribe(channel, common.DisplayReturnMessage, common.DisplayReturnMessageDummy);
+ pubnub.Subscribe(channel, commonSubscribe.DisplayReturnMessageDummy, commonSubscribe.DisplayReturnMessage);
+
+ while (!commonSubscribe.DeliveryStatus);
- while (!common.DeliveryStatus) ;
-
- string response = "";
- if (common.Response.Equals (null)) {
+ pubnub.HereNow<string>(channel, commonHereNow.DisplayReturnMessage);
+
+ while (!commonHereNow.DeliveryStatus);
+
+ if (commonHereNow.Response == null) {
Assert.Fail("Null response");
}
else
{
- IList<object> responseFields = common.Response as IList<object>;
- if(responseFields != null)
- {
- foreach (object item in responseFields)
- {
- response = item.ToString();
- Console.WriteLine("Response:" + response);
- }
- Assert.True((responseFields[0].ToString()).Contains(pubnub.SessionUUID));
- }
- else
- {
- Assert.Fail("null response");
- }
+ Assert.True(commonHereNow.Response.ToString().Contains(pubnub.SessionUUID));
}
}
}
@@ -8,7 +8,6 @@
using System.IO;
using System.Diagnostics;
using System.Text;
-using Mono.Mozilla;
using System.Net.Sockets;
namespace PubNubMessaging.Tests
@@ -8,7 +8,7 @@ namespace PubNubMessaging.Tests
{
public class PubnubUnitTest : IPubnubUnitTest
{
- private bool enableStubTest = false;
+ private bool enableStubTest = true;
private string testClassName = "";
private string testCaseName = "";
@@ -472,11 +472,12 @@ public bool EnableStubTest
data.Add("/subscribe/demo/hello_world/0/13559014566792816", "[[],\"13559014566792816\"]");
#else
data.Add("/subscribe/demo/hello_world-pnpres/0/0", "[[],\"13559007117760880\"]");
- data.Add("/subscribe/demo/hello_world-pnpres,hello_world/0/0", "[[{\"action\": \"join\", \"timestamp\": 1355929955, \"uuid\": \"CustomSessionUUIDTest\", \"occupancy\": 1}],\"13559011560379628\"]");
- data.Add("/subscribe/demo/hello_world-pnpres/0/13559011560379628", "[[],\"13559011560379628\"]");
- data.Add("/subscribe/demo/hello_world/0/0", "[[],\"13559006802662768\"]");
- data.Add("/subscribe/demo/hello_world/0/13559006802662768", "[[\"demo test for stubs\"],\"13559014566792816\"]");
- data.Add("/subscribe/demo/hello_world/0/13559014566792816", "[[],\"13559014566792816\"]");
+ data.Add("/v2/presence/sub_key/demo/channel/hello_world", "{\"uuids\":[\"1b31e299-0c55-4e0b-b1da-04243dd1b4aa\",\"CustomSessionUUIDTest\"],\"occupancy\":2}");
+ data.Add("/subscribe/demo/hello_world/0/0", "[[],\"13559011560379628\"]");
+ data.Add("/subscribe/demo/hello_world/0/13559011560379628", "[[],\"13559014566792816\"]");
+ data.Add("/subscribe/demo/hello_world/0/13559007117760880", "[[{\"action\": \"join\", \"timestamp\": 1355929955, \"uuid\": \"CustomSessionUUIDTest\", \"occupancy\": 1}],\"13559011560379628\"]");
+ data.Add("/subscribe/demo/hello_world/0/13559006802662768", "[[\"f7wNXpx8Ys8pVJNR5ZHT9g==\"],\"13559014566792816\"]");
+ data.Add("/subscribe/demo/hello_world/0/13559014566792816", "[[],\"13559014566792816\"]");
#endif
data.Add("/v2/presence/sub_key/demo/channel/hello_world/leave", "{\"action\": \"leave\"}");
return data;
@@ -141,42 +141,34 @@ public void ThenPresenceShouldReturnCustomUUID()
{
Pubnub pubnub = new Pubnub("demo", "demo", "", "", false);
- Common common = new Common();
- common.DeliveryStatus = false;
- common.Response = null;
+ Common commonHereNow = new Common();
+ commonHereNow.DeliveryStatus = false;
+ commonHereNow.Response = null;
- pubnub.PubnubUnitTest = common.CreateUnitTestInstance("WhenAClientIsPresented", "ThenPresenceShouldReturnCustomUUID");;
+ Common commonSubscribe = new Common();
+ commonSubscribe.DeliveryStatus = false;
+ commonSubscribe.Response = null;
+
+ pubnub.PubnubUnitTest = commonHereNow.CreateUnitTestInstance("WhenAClientIsPresented", "ThenPresenceShouldReturnCustomUUID");;
pubnub.SessionUUID = "CustomSessionUUIDTest";
string channel = "hello_world";
- pubnub.Presence(channel, common.DisplayReturnMessageDummy, common.DisplayReturnMessageDummy);
+ pubnub.Subscribe(channel, commonSubscribe.DisplayReturnMessageDummy, commonSubscribe.DisplayReturnMessage);
- pubnub.Subscribe(channel, common.DisplayReturnMessage, common.DisplayReturnMessageDummy);
+ while (!commonSubscribe.DeliveryStatus) ;
- while (!common.DeliveryStatus) ;
+ pubnub.HereNow<string>(channel, commonHereNow.DisplayReturnMessage);
- string response = "";
- if (common.Response.Equals (null)) {
+ while (!commonHereNow.DeliveryStatus) ;
+
+ if (commonHereNow.Response == null) {
Assert.Fail("Null response");
}
else
{
- IList<object> responseFields = common.Response as IList<object>;
- if(responseFields != null)
- {
- foreach (object item in responseFields)
- {
- response = item.ToString();
- Console.WriteLine("Response:" + response);
- }
- Assert.True((responseFields[0].ToString()).Contains(pubnub.SessionUUID));
- }
- else
- {
- Assert.Fail("null response");
- }
- }
+ Assert.True(commonHereNow.Response.ToString().Contains(pubnub.SessionUUID));
+ }
}
}
}
@@ -1,21 +1,22 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhoneSimulator" />
- <MonoDevelop.Ide.Workbench ActiveDocument="Pubnub-Messaging.Tests/WhenAClientIsPresented.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="Pubnub-Messaging/Pubnub.cs">
<Files>
- <File FileName="Pubnub-Messaging.Tests/WhenAClientIsPresented.cs" Line="125" Column="20" />
- <File FileName="Pubnub-Messaging.Tests/PubnubUnitTest.cs" Line="27" Column="66" />
- <File FileName="Pubnub-Messaging/Pubnub.cs" Line="2416" Column="27" />
- <File FileName="Pubnub-Messaging/Pubnub_MessagingSpeedTest.cs" Line="192" Column="30" />
- <File FileName="Pubnub-Messaging/Pubnub_MessagingMain.cs" Line="38" Column="40" />
- <File FileName="Pubnub-Messaging/Pubnub_MessagingSub.cs" Line="61" Column="1" />
+ <File FileName="Pubnub-Messaging.Tests/WhenAClientIsPresented.cs" Line="33" Column="52" />
+ <File FileName="Pubnub-Messaging.Tests/PubnubUnitTest.cs" Line="70" Column="9" />
+ <File FileName="Pubnub-Messaging/Pubnub_MessagingSpeedTest.cs" Line="199" Column="4" />
+ <File FileName="Pubnub-Messaging.Tests/Common.cs" Line="13" Column="82" />
+ <File FileName="Pubnub-Messaging/Pubnub_MessagingSub.cs" Line="285" Column="4" />
+ <File FileName="Pubnub-Messaging/Pubnub_MessagingMain.cs" Line="146" Column="30" />
+ <File FileName="Pubnub-Messaging/Pubnub.cs" Line="2411" Column="9" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State expanded="True">
- <Node name="Pubnub-Messaging" expanded="True" />
- <Node name="Pubnub-Messaging.Tests" expanded="True">
- <Node name="WhenAClientIsPresented.cs" selected="True" />
+ <Node name="Pubnub-Messaging" expanded="True">
+ <Node name="Pubnub.cs" selected="True" />
</Node>
+ <Node name="Pubnub-Messaging.Tests" expanded="True" />
</State>
</Pad>
</Pads>
@@ -28,7 +29,9 @@
<Breakpoint file="/Volumes/Macintosh/Users/rajatkalsy/Projects/Client/ODesk/pubnub/MonoTouch/Pubnub-Messaging/Pubnub-Messaging/Pubnub_MessagingMain.cs" line="191" />
<Breakpoint file="/Volumes/Macintosh/Users/rajatkalsy/Projects/Client/ODesk/pubnub/MonoTouch/Pubnub-Messaging/Pubnub-Messaging/Pubnub.cs" line="1577" />
<Breakpoint file="/Volumes/Macintosh/Users/rajatkalsy/Projects/Client/ODesk/pubnub/MonoTouch/Pubnub-Messaging/Pubnub-Messaging/Pubnub.cs" line="1561" />
- <Breakpoint file="/Volumes/Macintosh/Users/rajatkalsy/Projects/Client/ODesk/pubnub/MonoTouch/Pubnub-Messaging/Pubnub-Messaging/Pubnub.cs" line="2415" />
+ <Breakpoint file="/Volumes/Macintosh/Users/rajatkalsy/Projects/Client/ODesk/pubnub/MonoTouch/Pubnub-Messaging/Pubnub-Messaging.Tests/WhenAClientIsPresented.cs" line="40" />
+ <Breakpoint file="/Volumes/Macintosh/Users/rajatkalsy/Projects/Client/ODesk/pubnub/MonoTouch/Pubnub-Messaging/Pubnub-Messaging/Pubnub.cs" line="1812" />
+ <Breakpoint file="/Volumes/Macintosh/Users/rajatkalsy/Projects/Client/ODesk/pubnub/MonoTouch/Pubnub-Messaging/Pubnub-Messaging/Pubnub.cs" line="2416" />
</BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
Oops, something went wrong.

0 comments on commit 1863155

Please sign in to comment.