Example #1
0
        public MetricsTestData(MonitorQueryClientTestEnvironment environment, DateTimeOffset dateTimeOffset)
        {
            _testEnvironment = environment;

            var recordingUtcNow = dateTimeOffset;

            // Snap to 15 minute intervals
            StartTime = recordingUtcNow.AddTicks(-(Duration.Ticks + recordingUtcNow.Ticks % Duration.Ticks));

            MetricName      = "CowsHappiness";
            MetricNamespace = "Cows";
        }
Example #2
0
        public MetricsTestData(RecordedTestBase <MonitorQueryClientTestEnvironment> test)
        {
            _testEnvironment = test.TestEnvironment;

            var recordingUtcNow = test.Recording.UtcNow;

            // Snap to 15 minute intervals
            StartTime = recordingUtcNow.AddTicks(-Duration.Ticks - recordingUtcNow.Ticks % Duration.Ticks);

            MetricName      = "CowsHappiness";
            MetricNamespace = "Cows";
        }
Example #3
0
        public LogsTestData(RecordedTestBase <MonitorQueryClientTestEnvironment> test)
        {
            _testEnvironment = test.TestEnvironment;

            var recordingUtcNow = DateTime.SpecifyKind(test.Recording.UtcNow.Date, DateTimeKind.Utc);

            RetentionWindowStart = recordingUtcNow.AddDays(DayOfWeek.Monday - recordingUtcNow.DayOfWeek - 7);

            TableA = new()
            {
                new()
                {
                    { IntColumnNameSent, 1 },
                    { StringColumnNameSent, "a" },
                    { BoolColumnNameSent, false },