Exemple #1
0
        public void GenerateSafeObjectKey_ReturnsExpectedKey_WithoutExtraDatePadding_WhenAllPartsArePresentAndValid()
        {
            const string expectedKey = "my_product/sitekey/myevent/2019/10/11/15/16de1167-9e28-4eb5-95e9-3b23b6191dc7.json";

            var ctx = new EventContext
            {
                MessageId    = "16de1167-9e28-4eb5-95e9-3b23b6191dc7",
                EventDateUtc = new DateTime(2019, 10, 11, 15, 00, 00, DateTimeKind.Utc),
                EventName    = "MyEvent",
                Product      = "My Product",
                SiteKey      = "SiteKey"
            };

            var key = S3ObjectKeyGeneratorNew.GenerateSafeObjectKey(ctx);

            key.Should().Be(expectedKey);
        }
 public void SpanBased() => _ = S3ObjectKeyGeneratorNew.GenerateSafeObjectKey(_context);