protected async Task TestExists(ActivityTimeframe timeframe)
        {
            var key = UserActivity.GenerateEventTimeframeKeys(
                EventName,
                timeframe,
                Timestamp)
                      .ElementAt((int)timeframe);

            using (var connection = await ConnectionFactories.Open())
            {
                var result = await connection.Strings.Get(
                    UserActivity.Settings.Db,
                    key);

                Assert.NotNull(result);
            }
        }
示例#2
0
        protected async Task TestExists(ActivityTimeframe timeframe)
        {
            var key = EventActivity.GenerateKey(
                EventName,
                EventActivity.Settings.Timeframe.ToString());

            var field = EventActivity.GenerateTimeframeFields(
                timeframe,
                Timestamp)
                        .ElementAt((int)timeframe);

            using (var connection = await ConnectionFactories.Open())
            {
                var result = await connection.Hashes
                             .Exists(EventActivity.Settings.Db, key, field);

                Assert.True(result);
            }
        }