コード例 #1
0
        public void CanCreateAcsRecordingFileStatusUpdatedEventData()
        {
            var model = EventGridModelFactory.AcsRecordingFileStatusUpdatedEventData(
                EventGridModelFactory.AcsRecordingStorageInfoProperties(),
                DateTimeOffset.Now,
                10,
                "reason");

            Assert.AreEqual(10, model.RecordingDurationMs);
            Assert.AreEqual("reason", model.SessionEndReason);

            model = EventGridModelFactory.AcsRecordingFileStatusUpdatedEventData(
                EventGridModelFactory.AcsRecordingStorageInfoProperties(),
                DateTimeOffset.Now,
                10,
                RecordingContentType.Audio,
                RecordingChannelType.Mixed,
                RecordingFormatType.Mp3);

            Assert.AreEqual(10, model.RecordingDurationMs);
            Assert.AreEqual(AcsRecordingContentType.Audio, model.ContentType);
            Assert.AreEqual(AcsRecordingChannelType.Mixed, model.ChannelType);
            Assert.AreEqual(AcsRecordingFormatType.Mp3, model.FormatType);

            // back compat
            Assert.AreEqual(RecordingContentType.Audio, model.RecordingContentType);
            Assert.AreEqual(RecordingChannelType.Mixed, model.RecordingChannelType);
            Assert.AreEqual(RecordingFormatType.Mp3, model.RecordingFormatType);

            // empty params
            model = EventGridModelFactory.AcsRecordingFileStatusUpdatedEventData();
            Assert.IsNotNull(model);
        }
コード例 #2
0
        public void CanCreateAcsRecordingFileStatusUpdatedEventData()
        {
            var model = EventGridModelFactory.AcsRecordingFileStatusUpdatedEventData(
                EventGridModelFactory.AcsRecordingStorageInfoProperties(),
                DateTimeOffset.Now,
                10,
                "reason");

            Assert.AreEqual(10, model.RecordingDurationMs);
            Assert.AreEqual("reason", model.SessionEndReason);
        }
コード例 #3
0
        public void CanCreateAcsRecordingStorageInfoProperties()
        {
            var model = EventGridModelFactory.AcsRecordingStorageInfoProperties(
                new List <AcsRecordingChunkInfoProperties>
            {
                EventGridModelFactory.AcsRecordingChunkInfoProperties("document", 0, "reason", "location", "content")
            });

            Assert.AreEqual("document", model.RecordingChunks.First().DocumentId);
            Assert.AreEqual(0, model.RecordingChunks.First().Index);
            Assert.AreEqual("reason", model.RecordingChunks.First().EndReason);
            Assert.AreEqual("location", model.RecordingChunks.First().MetadataLocation);
            Assert.AreEqual("content", model.RecordingChunks.First().ContentLocation);
        }