Example #1
0
        public void ResetDataMarkedForSendingMovesPreviouslyCopiedDataBack()
        {
            // given
            var dataOne   = new BeaconCacheRecord(0L, "One");
            var dataTwo   = new BeaconCacheRecord(0L, "Two");
            var dataThree = new BeaconCacheRecord(1L, "Three");
            var dataFour  = new BeaconCacheRecord(1L, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataFour);
            target.AddActionData(dataTwo);
            target.AddActionData(dataThree);

            target.CopyDataForSending();

            // when data is reset
            target.ResetDataMarkedForSending();

            // then
            Assert.That(target.EventData, Is.EqualTo(new[] { dataOne, dataFour }));
            Assert.That(target.ActionData, Is.EqualTo(new[] { dataTwo, dataThree }));
            Assert.That(target.EventDataBeingSent, Is.Null);
            Assert.That(target.ActionDataBeingSent, Is.Null);
        }
Example #2
0
        public void RemoveOldestRecordsDoesNotRemoveAnythingFromEventAndActionsBeingSent()
        {
            // given
            var dataOne   = new BeaconCacheRecord(1000L, "One");
            var dataTwo   = new BeaconCacheRecord(1500L, "Two");
            var dataThree = new BeaconCacheRecord(2000L, "Three");
            var dataFour  = new BeaconCacheRecord(2500L, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataFour);
            target.AddActionData(dataTwo);
            target.AddActionData(dataThree);

            target.CopyDataForSending();

            // when
            var obtained = target.RemoveOldestRecords(10000);

            // then
            Assert.That(obtained, Is.EqualTo(0));
            Assert.That(target.EventDataBeingSent, Is.EqualTo(new[] { dataOne, dataFour }));
            Assert.That(target.ActionDataBeingSent, Is.EqualTo(new[] { dataTwo, dataThree }));
        }
Example #3
0
        public void AddingEventData()
        {
            // given
            var dataOne = new BeaconCacheRecord(0L, "foo");
            var dataTwo = new BeaconCacheRecord(1L, "bar");

            var target = new BeaconCacheEntry();

            // when adding first record
            target.AddEventData(dataOne);

            // then
            Assert.That(target.ActionData, Is.Empty);
            Assert.That(target.EventData, Is.EqualTo(new object[] { dataOne }));
            Assert.That(target.EventDataBeingSent, Is.Null);
            Assert.That(target.ActionDataBeingSent, Is.Null);

            // and when adding second record
            target.AddEventData(dataTwo);

            // then
            Assert.That(target.ActionData, Is.Empty);
            Assert.That(target.EventData, Is.EqualTo(new object[] { dataOne, dataTwo }));
            Assert.That(target.EventDataBeingSent, Is.Null);
            Assert.That(target.ActionDataBeingSent, Is.Null);
        }
Example #4
0
        public void ResetDataMarkedForSendingResetsMarkedForSendingFlag()
        {
            // given
            var dataOne   = new BeaconCacheRecord(0L, "One");
            var dataTwo   = new BeaconCacheRecord(0L, "Two");
            var dataThree = new BeaconCacheRecord(1L, "Three");
            var dataFour  = new BeaconCacheRecord(1L, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataFour);
            target.AddActionData(dataTwo);
            target.AddActionData(dataThree);

            target.CopyDataForSending();

            // when data is retrieved
            target.GetChunk("", 1024, '&');

            // then all records are marked for sending
            Assert.That(dataOne.IsMarkedForSending, Is.True);
            Assert.That(dataTwo.IsMarkedForSending, Is.True);
            Assert.That(dataThree.IsMarkedForSending, Is.True);
            Assert.That(dataFour.IsMarkedForSending, Is.True);

            // and when
            target.ResetDataMarkedForSending();

            // then
            Assert.That(dataOne.IsMarkedForSending, Is.False);
            Assert.That(dataTwo.IsMarkedForSending, Is.False);
            Assert.That(dataThree.IsMarkedForSending, Is.False);
            Assert.That(dataFour.IsMarkedForSending, Is.False);
        }
Example #5
0
        public void DeleteCacheEntry(BeaconKey beaconKey)
        {
            if (logger.IsDebugEnabled)
            {
                var logString = new StringBuilder(GetType().Name)
                                .Append(" DeleteCacheEntry(sn=").Append(beaconKey.BeaconId.ToInvariantString())
                                .Append(", seq=").Append(beaconKey.BeaconSeqNo.ToInvariantString())
                                .Append(")")
                                .ToString();

                logger.Debug(logString);
            }
            BeaconCacheEntry entry = null;

            try
            {
                globalCacheLock.EnterWriteLock();
                if (beacons.ContainsKey(beaconKey))
                {
                    entry = beacons[beaconKey];
                    beacons.Remove(beaconKey);
                }
            }
            finally
            {
                globalCacheLock.ExitWriteLock();
            }

            if (entry != null)
            {
                Interlocked.Add(ref cacheSizeInBytes, -1L * entry.TotalNumBytes);
            }
        }
Example #6
0
        public void RemoveOldestRecordsComparesTopActionAndEventDataAndRemovesOldest()
        {
            // given
            var dataOne   = new BeaconCacheRecord(1000, "One");
            var dataTwo   = new BeaconCacheRecord(1100L, "Two");
            var dataThree = new BeaconCacheRecord(950L, "Three");
            var dataFour  = new BeaconCacheRecord(1200L, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddActionData(dataTwo);
            target.AddActionData(dataThree);
            target.AddEventData(dataFour);

            // when
            var obtained = target.RemoveOldestRecords(1);

            // then
            Assert.That(obtained, Is.EqualTo(1));
            Assert.That(target.ActionData, Is.EqualTo(new[] { dataTwo, dataThree }));
            Assert.That(target.EventData, Is.EqualTo(new[] { dataFour }));

            // when removing the next two
            obtained = target.RemoveOldestRecords(2);

            // then
            Assert.That(obtained, Is.EqualTo(2));
            Assert.That(target.ActionData, Is.Empty);
            Assert.That(target.EventData, Is.EqualTo(new[] { dataFour }));
        }
Example #7
0
        public void DeleteCacheEntry(int beaconID)
        {
            if (logger.IsDebugEnabled)
            {
                logger.Debug(GetType().Name + " DeleteCacheEntry(sn=" + beaconID + ")");
            }
            BeaconCacheEntry entry = null;

            try
            {
                globalCacheLock.EnterWriteLock();
                if (beacons.ContainsKey(beaconID))
                {
                    entry = beacons[beaconID];
                    beacons.Remove(beaconID);
                }
            }
            finally
            {
                globalCacheLock.ExitWriteLock();
            }

            if (entry != null)
            {
                Interlocked.Add(ref cacheSizeInBytes, -1L * entry.TotalNumBytes);
            }
        }
Example #8
0
        /// <summary>
        /// Get cached <see cref="BeaconCacheEntry"/> or insert new one if nothing exists for given <paramref name="beaconID"/>.
        /// </summary>
        /// <param name="beaconID">The beacon id to search for.</param>
        /// <returns>The already cached entry or newly created one.</returns>
        private BeaconCacheEntry GetCachedEntryOrInsert(int beaconID)
        {
            // get the appropriate cache entry
            var entry = GetCachedEntry(beaconID);

            if (entry == null)
            {
                try
                {
                    // does not exist, and needs to be inserted
                    globalCacheLock.EnterWriteLock();
                    if (!beacons.ContainsKey(beaconID))
                    {
                        // double check since this could have been added in the mean time
                        entry = new BeaconCacheEntry();
                        beacons.Add(beaconID, entry);
                    }
                    else
                    {
                        entry = beacons[beaconID];
                    }
                }
                finally
                {
                    globalCacheLock.ExitWriteLock();
                }
            }

            return(entry);
        }
Example #9
0
        public void GetChunksTakesSizeIntoAccount()
        {
            // given
            var dataOne   = new BeaconCacheRecord(0L, "One");
            var dataTwo   = new BeaconCacheRecord(0L, "Two");
            var dataThree = new BeaconCacheRecord(1L, "Three");
            var dataFour  = new BeaconCacheRecord(1L, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataFour);
            target.AddActionData(dataTwo);
            target.AddActionData(dataThree);

            target.CopyDataForSending();

            // when requesting first chunk
            var obtained = target.GetChunk("prefix", 1, '&');

            // then only prefix is returned, since "prefix".length > maxSize (=1)
            Assert.That(obtained, Is.EqualTo("prefix"));

            // and when retrieving something which is one character longer than "prefix"
            obtained = target.GetChunk("prefix", "prefix".Length, '&');

            // then based on the algorithm prefix and first element are retrieved
            Assert.That(obtained, Is.EqualTo("prefix&One"));

            // and when retrieving another chunk
            obtained = target.GetChunk("prefix", "prefix&One".Length, '&');

            // then
            Assert.That(obtained, Is.EqualTo("prefix&One&Four"));
        }
Example #10
0
        public void GetChunkMarksRetrievedData()
        {
            // given
            var dataOne   = new BeaconCacheRecord(0L, "One");
            var dataTwo   = new BeaconCacheRecord(0L, "Two");
            var dataThree = new BeaconCacheRecord(1L, "Three");
            var dataFour  = new BeaconCacheRecord(1L, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataFour);
            target.AddActionData(dataTwo);
            target.AddActionData(dataThree);

            target.CopyDataForSending();

            // when retrieving data
            var obtained = target.GetChunk("prefix", 1024, '&');

            // then
            Assert.That(obtained, Is.EqualTo("prefix&" + dataOne.Data + "&" + dataFour.Data + "&" + dataTwo.Data + "&" + dataThree.Data));
            // and all of them are marked
            Assert.That(dataOne.IsMarkedForSending, Is.True);
            Assert.That(dataTwo.IsMarkedForSending, Is.True);
            Assert.That(dataThree.IsMarkedForSending, Is.True);
            Assert.That(dataFour.IsMarkedForSending, Is.True);
        }
        public void NeedsDataCopyBeforeChunkingGivesFalseEvenIfListsAreEmpty()
        {
            // given
            var target = new BeaconCacheEntry();

            target.CopyDataForChunking();

            // when, then
            Assert.That(target.NeedsDataCopyBeforeChunking, Is.False);
        }
Example #12
0
        public void NeedsDataCopyBeforeSendingGivesTrueIfListsAreEmpty()
        {
            // given
            var target = new BeaconCacheEntry();

            target.CopyDataForSending();

            // when, then
            Assert.That(target.NeedsDataCopyBeforeSending, Is.True);
        }
Example #13
0
        public void RemoveOldestRecordsRemovesNothingIfEntryIsEmpty()
        {
            // given
            var target = new BeaconCacheEntry();

            // when
            var obtained = target.RemoveOldestRecords(1);

            // then
            Assert.That(obtained, Is.EqualTo(0));
        }
Example #14
0
        public void RemoveRecordsOlderThanRemovesNothingIfNoActionOrEventDataExists()
        {
            // given
            var target = new BeaconCacheEntry();

            // when
            var obtained = target.RemoveRecordsOlderThan(0);

            // then
            Assert.That(obtained, Is.EqualTo(0));
        }
Example #15
0
        public void ADefaultConstructedInstanceHasNoData()
        {
            // given
            var target = new BeaconCacheEntry();

            // then
            Assert.That(target.ActionData, Is.Empty);
            Assert.That(target.EventData, Is.Empty);
            Assert.That(target.EventDataBeingSent, Is.Null);
            Assert.That(target.ActionDataBeingSent, Is.Null);
        }
Example #16
0
        public void HasDataForSendingReturnsFalseIfNoDataWasAddedBeforeCopying()
        {
            // given
            var target = new BeaconCacheEntry();

            target.CopyDataForSending();

            // when
            var obtained = target.HasDataToSend;

            // then
            Assert.That(obtained, Is.False);
        }
Example #17
0
        public void GetChunkGetsChunksFromEventDataBeforeActionData()
        {
            // given
            var dataOne   = new BeaconCacheRecord(0L, "One");
            var dataTwo   = new BeaconCacheRecord(0L, "Two");
            var dataThree = new BeaconCacheRecord(1L, "Three");
            var dataFour  = new BeaconCacheRecord(1L, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataFour);
            target.AddActionData(dataTwo);
            target.AddActionData(dataThree);

            target.CopyDataForSending();

            // when getting data to send
            var obtained = target.GetChunk("a", 2, '&');

            // then it's the first event data
            Assert.That(obtained, Is.EqualTo("a&" + dataOne.Data));

            // and when removing already sent data and getting next chunk
            target.RemoveDataMarkedForSending();
            obtained = target.GetChunk("a", 2, '&');

            // then it's second event data
            Assert.That(obtained, Is.EqualTo("a&" + dataFour.Data));

            // and when removing already sent data and getting next chunk
            target.RemoveDataMarkedForSending();
            obtained = target.GetChunk("a", 2, '&');

            // then it's the first action data
            Assert.That(obtained, Is.EqualTo("a&" + dataTwo.Data));

            // and when removing already sent data and getting next chunk
            target.RemoveDataMarkedForSending();
            obtained = target.GetChunk("a", 2, '&');

            // then it's the second action data
            Assert.That(obtained, Is.EqualTo("a&" + dataThree.Data));

            // and when removing already sent data and getting next chunk
            target.RemoveDataMarkedForSending();
            obtained = target.GetChunk("a", 2, '&');

            // then we get an empty string, since all chunks were sent & deleted
            Assert.That(obtained, Is.Empty);
        }
Example #18
0
        public void HasDataForSendingReturnsFalseIfDataWasNotCopied()
        {
            // given
            var dataOne = new BeaconCacheRecord(1000L, "One");
            var dataTwo = new BeaconCacheRecord(1500L, "Two");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataTwo);

            // when
            var obtained = target.HasDataToSend;

            // then
            Assert.That(obtained, Is.False);
        }
Example #19
0
        public void HasDataForSendingReturnsTrueIfActionDataWasAddedBeforeCopying()
        {
            // given
            var record = new BeaconCacheRecord(1000L, "One");

            var target = new BeaconCacheEntry();

            target.AddActionData(record);

            target.CopyDataForSending();

            // when
            var obtained = target.HasDataToSend;

            // then
            Assert.That(obtained, Is.True);
        }
Example #20
0
        public void NeedsDataCopyBeforeSendingGivesTrueBeforeDataIsCopied()
        {
            // given
            var target = new BeaconCacheEntry();

            var dataOne   = new BeaconCacheRecord(0L, "One");
            var dataTwo   = new BeaconCacheRecord(0L, "Two");
            var dataThree = new BeaconCacheRecord(1L, "Three");
            var dataFour  = new BeaconCacheRecord(1L, "Four");


            target.AddEventData(dataOne);
            target.AddEventData(dataFour);
            target.AddActionData(dataTwo);
            target.AddActionData(dataThree);

            // when, then
            Assert.That(target.NeedsDataCopyBeforeSending, Is.True);
        }
Example #21
0
        /// <summary>
        /// Get cached <see cref="BeaconCacheEntry"/> or <code>null</code> if nothing exists for given <paramref name="beaconID"/>.
        /// </summary>
        /// <param name="beaconID">The beacon id to search for.</param>
        /// <returns>The cached entry or <code>null</code>.</returns>
        private BeaconCacheEntry GetCachedEntry(int beaconID)
        {
            BeaconCacheEntry entry = null;

            // acquuire read lock and get the entry
            try
            {
                globalCacheLock.EnterReadLock();
                if (beacons.TryGetValue(beaconID, out BeaconCacheEntry result))
                {
                    entry = result;
                }
            }
            finally
            {
                globalCacheLock.ExitReadLock();
            }

            return(entry);
        }
        public void NeedsDataCopyBeforeChunkingGivesFalseAfterDataHasBeenCopied()
        {
            // given
            var target = new BeaconCacheEntry();

            var dataOne   = new BeaconCacheRecord(0L, "One");
            var dataTwo   = new BeaconCacheRecord(0L, "Two");
            var dataThree = new BeaconCacheRecord(1L, "Three");
            var dataFour  = new BeaconCacheRecord(1L, "Four");


            target.AddEventData(dataOne);
            target.AddEventData(dataFour);
            target.AddActionData(dataTwo);
            target.AddActionData(dataThree);

            target.CopyDataForChunking();

            // when, then
            Assert.That(target.NeedsDataCopyBeforeChunking, Is.False);
        }
Example #23
0
        public void RemoveOldestRecordsRemovesEventDataIfActionDataIsEmpty()
        {
            // given
            var dataOne   = new BeaconCacheRecord(4000L, "One");
            var dataTwo   = new BeaconCacheRecord(3000L, "Two");
            var dataThree = new BeaconCacheRecord(2000L, "Three");
            var dataFour  = new BeaconCacheRecord(1000L, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataTwo);
            target.AddEventData(dataThree);
            target.AddEventData(dataFour);

            // when
            var obtained = target.RemoveOldestRecords(2);

            // then
            Assert.That(obtained, Is.EqualTo(2)); // two were removed
            Assert.That(target.EventData, Is.EqualTo(new[] { dataThree, dataFour }));
        }
Example #24
0
        public void RemoveRecordsOlderThanRemovesRecordsFromEventData()
        {
            // given
            var dataOne   = new BeaconCacheRecord(4000L, "One");
            var dataTwo   = new BeaconCacheRecord(3000L, "Two");
            var dataThree = new BeaconCacheRecord(2000L, "Three");
            var dataFour  = new BeaconCacheRecord(1000L, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataTwo);
            target.AddEventData(dataThree);
            target.AddEventData(dataFour);

            // when removing everything older than 3000
            var obtained = target.RemoveRecordsOlderThan(dataTwo.Timestamp);

            // then
            Assert.That(obtained, Is.EqualTo(2)); // two were removed
            Assert.That(target.EventData, Is.EqualTo(new[] { dataOne, dataTwo }));
        }
Example #25
0
        public void GetTotalNumberOfBytesCountsAddedRecordBytes()
        {
            // given
            var dataOne   = new BeaconCacheRecord(0L, "One");
            var dataTwo   = new BeaconCacheRecord(0L, "Two");
            var dataThree = new BeaconCacheRecord(1L, "Three");
            var dataFour  = new BeaconCacheRecord(1L, "Four");

            var target = new BeaconCacheEntry();

            // when getting total number of bytes on an empty entry, then
            Assert.That(target.TotalNumBytes, Is.EqualTo(0L));

            // and when adding first entry
            target.AddActionData(dataOne);

            // then
            Assert.That(target.TotalNumBytes, Is.EqualTo(dataOne.DataSizeInBytes));

            // and when adding next entry
            target.AddEventData(dataTwo);

            // then
            Assert.That(target.TotalNumBytes, Is.EqualTo(dataOne.DataSizeInBytes + dataTwo.DataSizeInBytes));

            // and when adding next entry
            target.AddEventData(dataThree);

            // then
            Assert.That(target.TotalNumBytes, Is.EqualTo(dataOne.DataSizeInBytes + dataTwo.DataSizeInBytes + dataThree.DataSizeInBytes));

            // and when adding next entry
            target.AddActionData(dataFour);

            // Assert.That
            Assert.That(target.TotalNumBytes, Is.EqualTo(dataOne.DataSizeInBytes + dataTwo.DataSizeInBytes
                                                         + dataThree.DataSizeInBytes + dataFour.DataSizeInBytes));
        }
Example #26
0
        public void DeleteCacheEntry(int beaconID)
        {
            BeaconCacheEntry entry = null;

            try
            {
                globalCacheLock.EnterWriteLock();
                if (beacons.ContainsKey(beaconID))
                {
                    entry = beacons[beaconID];
                    beacons.Remove(beaconID);
                }
            }
            finally
            {
                globalCacheLock.ExitWriteLock();
            }

            if (entry != null)
            {
                Interlocked.Add(ref cacheSizeInBytes, -1L * entry.TotalNumBytes);
            }
        }
Example #27
0
        public void RemoveOldestRecordsRemovesEventDataIfTopEventDataAndActionDataHaveSameTimestamp()
        {
            // given
            var dataOne   = new BeaconCacheRecord(1000, "One");
            var dataTwo   = new BeaconCacheRecord(1100L, "Two");
            var dataThree = new BeaconCacheRecord(dataOne.Timestamp, "Three");
            var dataFour  = new BeaconCacheRecord(dataTwo.Timestamp, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataTwo);
            target.AddActionData(dataThree);
            target.AddActionData(dataFour);

            // when
            var obtained = target.RemoveOldestRecords(1);

            // then
            Assert.That(obtained, Is.EqualTo(1));
            Assert.That(target.ActionData, Is.EqualTo(new[] { dataThree, dataFour }));
            Assert.That(target.EventData, Is.EqualTo(new[] { dataTwo }));
        }
Example #28
0
        public void RemoveOldestRecordsStopsIfListsAreEmpty()
        {
            // given
            var dataOne   = new BeaconCacheRecord(4000L, "One");
            var dataTwo   = new BeaconCacheRecord(3000L, "Two");
            var dataThree = new BeaconCacheRecord(2000L, "Three");
            var dataFour  = new BeaconCacheRecord(1000L, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataTwo);
            target.AddEventData(dataThree);
            target.AddEventData(dataFour);

            // when
            var obtained = target.RemoveOldestRecords(100);

            // then
            Assert.That(obtained, Is.EqualTo(4));
            Assert.That(target.EventData, Is.Empty);
            Assert.That(target.ActionData, Is.Empty);
        }
Example #29
0
        public void GetChunkGetsAlreadyMarkedData()
        {
            // given
            var dataOne   = new BeaconCacheRecord(0L, "One");
            var dataTwo   = new BeaconCacheRecord(0L, "Two");
            var dataThree = new BeaconCacheRecord(1L, "Three");
            var dataFour  = new BeaconCacheRecord(1L, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataFour);
            target.AddActionData(dataTwo);
            target.AddActionData(dataThree);

            target.CopyDataForSending();

            // when getting data to send
            var obtained = target.GetChunk("a", 100, '&');

            // then
            Assert.That(obtained, Is.EqualTo("a&One&Four&Two&Three"));
            Assert.That(dataOne.IsMarkedForSending, Is.True);
            Assert.That(dataTwo.IsMarkedForSending, Is.True);
            Assert.That(dataThree.IsMarkedForSending, Is.True);
            Assert.That(dataFour.IsMarkedForSending, Is.True);

            // when getting data to send once more
            obtained = target.GetChunk("a", 100, '&');

            // then
            Assert.That(obtained, Is.EqualTo("a&One&Four&Two&Three"));
            Assert.That(dataOne.IsMarkedForSending, Is.True);
            Assert.That(dataTwo.IsMarkedForSending, Is.True);
            Assert.That(dataThree.IsMarkedForSending, Is.True);
            Assert.That(dataFour.IsMarkedForSending, Is.True);
        }
Example #30
0
        public void CopyDataForSendingMovesData()
        {
            // given
            var dataOne   = new BeaconCacheRecord(0L, "One");
            var dataTwo   = new BeaconCacheRecord(0L, "Two");
            var dataThree = new BeaconCacheRecord(1L, "Three");
            var dataFour  = new BeaconCacheRecord(1L, "Four");

            var target = new BeaconCacheEntry();

            target.AddEventData(dataOne);
            target.AddEventData(dataFour);
            target.AddActionData(dataTwo);
            target.AddActionData(dataThree);

            // when copying data for later chunking
            target.CopyDataForSending();

            // then the data was moved
            Assert.That(target.EventDataBeingSent, Is.EqualTo(new[] { dataOne, dataFour }));
            Assert.That(target.ActionDataBeingSent, Is.EqualTo(new[] { dataTwo, dataThree }));
            Assert.That(target.EventData, Is.Empty);
            Assert.That(target.ActionData, Is.Empty);
        }