Exemple #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));
        }
Exemple #2
0
        public void ProgramMetadata_ReplaceStringMetadataWithNull_ResultIsNotNull(IProgramMetadataFieldId field)
        {
            var metadata = new ProgramMetadata();

            metadata.ReplaceValue(field, null);

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

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