Skip to content

Commit

Permalink
Added Feedback service test
Browse files Browse the repository at this point in the history
  • Loading branch information
Redth committed Mar 16, 2016
1 parent 38c51c7 commit fcb051e
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion PushSharp.Tests/ApnsRealTest.cs
Expand Up @@ -22,7 +22,7 @@ public void APNS_Send_Single ()
failed++;
};
broker.OnNotificationSucceeded += (notification) => {
succeeded++;
succeeded++;
};
broker.Start ();

Expand All @@ -39,6 +39,22 @@ public void APNS_Send_Single ()
Assert.AreEqual (attempted, succeeded);
Assert.AreEqual (0, failed);
}

[Test]
public void APNS_Feedback_Service ()
{
var config = new ApnsConfiguration (
ApnsConfiguration.ApnsServerEnvironment.Sandbox,
Settings.Instance.ApnsCertificateFile,
Settings.Instance.ApnsCertificatePassword);

var fbs = new FeedbackService (config);
fbs.FeedbackReceived += (string deviceToken, DateTime timestamp) => {
// Remove the deviceToken from your database
// timestamp is the time the token was reported as expired
};
fbs.Check ();
}
}
}

0 comments on commit fcb051e

Please sign in to comment.