public override void Setup() { base.Setup(); CreateAndAuthenticateTestAdminAccount().Wait(); var sut = new PushNotificationRegistrationServiceClient(BaseUrl, SessionId, new DummyPackageInfo(), null, null); sut.Register(_knownDeviceToken, PushNotificationServicePlatform.Android).Wait(); }
public async void UnregisterDevice() { var sut = new PushNotificationRegistrationServiceClient(BaseUrl, SessionId, new DummyPackageInfo(), null, null); await sut.Unregister(_knownDeviceToken); using (var bookingDbContext = new BookingDbContext("MKWebDev")) { var registration = bookingDbContext.Set <DeviceDetail>() .FirstOrDefault(x => x.DeviceToken == _knownDeviceToken); Assert.Null(registration); } }
public async void RegisterDevice() { var sut = new PushNotificationRegistrationServiceClient(BaseUrl, SessionId, new DummyPackageInfo(), null, null); var deviceToken = Guid.NewGuid().ToString(); await sut.Register(deviceToken, PushNotificationServicePlatform.Android); using (var bookingDbContext = new BookingDbContext("MKWebDev")) { var registration = bookingDbContext.Set <DeviceDetail>() .FirstOrDefault(x => x.DeviceToken == deviceToken); Assert.NotNull(registration); } }