public void ProgramRomInformationBuilder_BuildWithNoFieldsSet_ThrowsInvalidOperationExceptionContainingMissingRequiredFields() { var builder = new ProgramRomInformationBuilder(); var exception = Assert.Throws <InvalidOperationException>(() => builder.Build()); ValidateExceptionMessageContainsFieldNames(exception.Message, new[] { "Id", "Format", "Title", "Features", "Metadata" }); }
public void ProgramRomInformationBuilder_BuildWithNoMetadataField_ThrowsInvalidOperationExceptionContainingMissingRequiredField() { var builder = new ProgramRomInformationBuilder() .WithId(new ProgramIdentifier(7u, 8u)) .WithFormat(RomFormat.Bin) .WithTitle("The Title") .WithFeatures(ProgramFeatures.DefaultFeatures); var exception = Assert.Throws <InvalidOperationException>(() => builder.Build()); ValidateExceptionMessageContainsFieldNames(exception.Message, new[] { "Metadata" }); }