public void AddMp4TemporaryTest() { var result = _materialService.AddTemporary(ApiTestHelper.GetMp4Bytes(), MaterialType.Video); Assert.Equal(MaterialType.Video, result.Type); Assert.NotNull(result.MediaId); Assert.Equal(DateTime.Now.Year, result.CreateTime.Year); }
public void AddMp4Test() { var result = _materialService.AddVoide(ApiTestHelper.GetMp4Bytes(), new AddVoideMaterialModel { Title = "视频标题", Description = "视频说明" }); Assert.NotNull(result.MediaId); // Assert.True(Uri.IsWellFormedUriString(result.Url, UriKind.Absolute)); }
public void SendVideoMessageTest() { var thumbnailsMedia = _temporaryMaterialService.AddTemporary(ApiTestHelper.GetJpgBytes(), MaterialType.Thumb); var result = _temporaryMaterialService.AddTemporary(ApiTestHelper.GetMp4Bytes(), MaterialType.Video); _customServiceMessageService.Send(new CustomServiceMessageVideo(OpenId) { Description = "视频说明", MediaId = result.MediaId, ThumbnailsMediaId = thumbnailsMedia.MediaId, Title = "视频标题" }); }
public void SendVideoByGroupTest() { var result = _foreverMaterialService.AddOther(ApiTestHelper.GetMp4Bytes()); _groupMessageService.SendByGroup(new GroupFilter(), new GroupMessageVideo(result.MediaId, "视频标题", "视频描述")); }