public void AddJpgTemporaryTest()
        {
            var result = _materialService.AddTemporary(ApiTestHelper.GetJpgBytes(), MaterialType.Image);

            Assert.Equal(MaterialType.Image, result.Type);
            Assert.NotNull(result.MediaId);
            Assert.Equal(DateTime.Now.Year, result.CreateTime.Year);
        }
Exemplo n.º 2
0
        public void SendImageMessageTest()
        {
            var result = _temporaryMaterialService.AddTemporary(ApiTestHelper.GetJpgBytes(), MaterialType.Image);

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