예제 #1
0
        public void AddAmrTest()
        {
            var result = _materialService.AddOther(ApiTestHelper.GetAmrBytes());

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

            Assert.Equal(MaterialType.Voice, result.Type);
            Assert.NotNull(result.MediaId);
            Assert.Equal(DateTime.Now.Year, result.CreateTime.Year);
        }
예제 #3
0
        public void SendVoiceMessageTest()
        {
            var result = _temporaryMaterialService.AddTemporary(ApiTestHelper.GetAmrBytes(), MaterialType.Voice);

            _customServiceMessageService.Send(new CustomServiceMessageVoice(OpenId)
            {
                MediaId = result.MediaId
            });
        }