public void Should_match_delete_cmd_of_many_elements()
        {
            var entityProfile = new ReturningEntityProfile();
            var elements      = new List <TestEntity>
            {
                new TestEntity {
                    RecordId = "rec-01", SensorId = "sens-01", IntValue = 127
                },
                new TestEntity {
                    RecordId = "rec-02", SensorId = "sens-01", IntValue = 128
                },
                new TestEntity {
                    RecordId = "rec-01", SensorId = "sens-02", IntValue = 227
                },
                new TestEntity {
                    RecordId = "rec-02", SensorId = "sens-02", IntValue = 228
                }
            };
            var commands = _testService.Generate(elements, entityProfile, CancellationToken.None);

            Assert.NotNull(commands);
            Assert.AreEqual(1, commands.Count);
            var commandResult = commands.First();

            Assert.NotNull(commandResult.Command);

            Assert.IsTrue(Regex.IsMatch(commandResult.Command, DELETE_PATTERN, RegexOptions.IgnoreCase));
        }
        public void Should_match_delete_cmd_for_more_than_65K_entities()
        {
            var entityProfile = new ReturningEntityProfile();
            var elements      = new List <TestEntity>();

            for (var i = 0; i < 70_000; i++)
            {
                elements.Add(new TestEntity {
                    Id = 12, RecordId = $"rec-{i}", SensorId = $"sens-{i}", IntValue = 127
                });
            }
            var commands = _testService.Generate(elements, entityProfile, CancellationToken.None);

            Assert.NotNull(commands);
            Assert.AreEqual(1, commands.Count);

            Assert.NotNull(commands[0].Command);
            Assert.IsTrue(Regex.IsMatch(commands[0].Command, DELETE_PATTERN, RegexOptions.IgnoreCase));
        }