示例#1
0
        public void AudioBlockNoTitle()
        {
            var block = new AudioBlock();
            var title = block.GetTitle();

            Assert.Equal("No audio selected", title);
        }
示例#2
0
        public async Task AudioBlockHasTitle()
        {
            using (var api = CreateApi())
            {
                var media = await api.Media.GetByIdAsync(image1Id);

                var block = new AudioBlock()
                {
                    Body = new Extend.Fields.AudioField
                    {
                        Id    = media.Id,
                        Media = media
                    }
                };
                var title = block.GetTitle();

                Assert.Equal("HLD_Screenshot_01_mech_1080.png", title);
            }
        }