public async Task ObserveNotificationAsync_Works_Async() { await using (MemoryStream stream = new MemoryStream()) await using (NotificationProxyClient client = new NotificationProxyClient(stream, NullLogger <NotificationProxyClient> .Instance)) { await client.ObserveNotificationAsync("com.apple.mobile.application_installed", default).ConfigureAwait(false); var data = stream.ToArray(); Assert.Equal(File.ReadAllBytes("NotificationProxy/notificationproxy-host.bin"), data); } }
public async Task ReadRelayNotificationAsync_Works_Async() { await using (Stream stream = File.OpenRead("NotificationProxy/notificationproxy-device.bin")) await using (NotificationProxyClient client = new NotificationProxyClient(stream, NullLogger <NotificationProxyClient> .Instance)) { var notification = await client.ReadRelayNotificationAsync(default).ConfigureAwait(false);