public void IProgramInformationToXmlRomInformationConverter_ConvertInformationWithOneCrc_XmlRomInformationHasExpectedOriginString(ProgramInformationOrigin originToTest, string expectedOriginString) { var information = new TestProgramInformation() { Title = "Origin tester info" }; information.SetOrigin(originToTest); information.AddCrcs(1, setVersionMetadata: false); var xmlRomInformation = IProgramInformationToXmlRomInformationConverter.Instance.Convert(information).Single(); Assert.Equal(expectedOriginString, xmlRomInformation.GetColumn(XmlRomInformationDatabaseColumnName.origin).Value); }
public void UserSpecifiedProgramInformation_ConstructWithNonMetadataProgramInformation_CreatesExpectedInformation(string year) { var sourceInformation = new TestProgramInformation(0x24680246, null, IncompatibilityFlags.KeyboardComponent) { Title = "Sumpin' Mysterious", Vendor = "Somewhat Mysterious, Inc.", Year = year, ShortName = "S.M.", Features = new ProgramFeaturesBuilder().WithEcsFeatures(EcsFeatures.Synthesizer).Build() as ProgramFeatures }; sourceInformation.AddCrc(0x13579135, "(revised)", IncompatibilityFlags.Tutorvision); sourceInformation.SetOrigin(ProgramInformationOrigin.UpdateFragment); var information = new UserSpecifiedProgramInformation(sourceInformation); Assert.False(information.IsModified); VerifyInformation(sourceInformation, information); }