示例#1
0
        public void ProgramMetadata_ReplaceStringMetadata_ReplacesMetadata(IProgramMetadataFieldId field, IEnumerable <string> replacementData)
        {
            var metadata = new ProgramMetadata();

            metadata.ReplaceValue(field, replacementData);

            Assert.Equal(replacementData, GetStringMetadata(metadata, field));
        }
示例#2
0
        public void ProgramMetadata_ReplaceStringMetadataWithNull_ResultIsNotNull(IProgramMetadataFieldId field)
        {
            var metadata = new ProgramMetadata();

            metadata.ReplaceValue(field, null);

            Assert.NotNull(GetStringMetadata(metadata, field));
        }
示例#3
0
        public void ProgramMetadata_ReplaceBogusStringMetadata_ThrowsInvalidOperationException(IProgramMetadataFieldId field)
        {
            var metadata = new ProgramMetadata();

            Assert.Throws <InvalidOperationException>(() => metadata.ReplaceValue(field, new[] { "Nanu nanu" }));
        }