Exemplo n.º 1
0
            public async void Earlier_NotAdded()
            {
                var mockPushSyncStore = MockPushSyncStore(new[] { new SyncAction()
                                                                  {
                                                                      Id       = "locationSync",
                                                                      Deadline = Now.AddMinutes(10)
                                                                  } });
                var service = new PushSyncService(mockPushSyncStore.Object, MockDigitPushServiceCLient(),
                                                  Mock.Of <IFocusStore>());
                await service.SetLocationRequestedExternal(userId, Now.AddMinutes(25));

                mockPushSyncStore.Verify(v => v.AddSyncAction(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <DateTimeOffset>()), Times.Never);
            }
Exemplo n.º 2
0
            public async void None_Add()
            {
                var mockPushSyncStore = MockPushSyncStore(new[] { new SyncAction()
                                                                  {
                                                                      Id       = "other",
                                                                      Deadline = Now.AddMinutes(10)
                                                                  } });
                var service = new PushSyncService(mockPushSyncStore.Object, MockDigitPushServiceCLient(),
                                                  Mock.Of <IFocusStore>());
                await service.SetLocationRequestedExternal(userId, Now.AddMinutes(25));

                mockPushSyncStore.Verify(v => v.AddSyncAction(userId, "locationSync", Now.AddMinutes(25)), Times.Once);
            }