public void ProgramMetadata_ReplaceStringMetadata_ReplacesMetadata(IProgramMetadataFieldId field, IEnumerable <string> replacementData) { var metadata = new ProgramMetadata(); metadata.ReplaceValue(field, replacementData); Assert.Equal(replacementData, GetStringMetadata(metadata, field)); }
public void ProgramMetadata_ReplaceStringMetadataWithNull_ResultIsNotNull(IProgramMetadataFieldId field) { var metadata = new ProgramMetadata(); metadata.ReplaceValue(field, null); Assert.NotNull(GetStringMetadata(metadata, field)); }
public void ProgramMetadata_ReplaceBogusStringMetadata_ThrowsInvalidOperationException(IProgramMetadataFieldId field) { var metadata = new ProgramMetadata(); Assert.Throws <InvalidOperationException>(() => metadata.ReplaceValue(field, new[] { "Nanu nanu" })); }