Ejemplo n.º 1
0
        public void AddMp3Test()
        {
            var result = _materialService.AddOther(ApiTestHelper.GetMp3Bytes());

            Assert.NotNull(result.MediaId);
            //            Assert.True(Uri.IsWellFormedUriString(result.Url, UriKind.Absolute));
        }
        public void AddMp3TemporaryTest()
        {
            var result = _materialService.AddTemporary(ApiTestHelper.GetMp3Bytes(), MaterialType.Voice);

            Assert.Equal(MaterialType.Voice, result.Type);
            Assert.NotNull(result.MediaId);
            Assert.Equal(DateTime.Now.Year, result.CreateTime.Year);
        }
Ejemplo n.º 3
0
        public void SendVoiceByGroupTest()
        {
            var result = _foreverMaterialService.AddOther(ApiTestHelper.GetMp3Bytes());

            _groupMessageService.SendByGroup(new GroupFilter(), new GroupMessageVoice(result.MediaId));
        }