public IProgramFeaturesBuilder WithInitialFeatures(IProgramFeatures initialFeatures) { if (initialFeatures != null) { _programFeatures = ProgramFeatures.EmptyFeatures.Clone(); WithGeneralFeatures(initialFeatures.GeneralFeatures); WithNtscCompatibility(initialFeatures.Ntsc); WithPalCompatibility(initialFeatures.Pal); WithKeyboardComponentFeatures(initialFeatures.KeyboardComponent); WithSuperVideoArcadeCompatibility(initialFeatures.SuperVideoArcade); WithIntellivoiceCompatibility(initialFeatures.Intellivoice); WithIntellivisionIICompatibility(initialFeatures.IntellivisionII); WithEcsFeatures(initialFeatures.Ecs); WithTutorvisionCompatibility(initialFeatures.Tutorvision); WithIntellicartFeatures(initialFeatures.Intellicart); WithCuttleCart3Features(initialFeatures.CuttleCart3); WithJlpFeatures(initialFeatures.Jlp); WithMinimumFlashSectors(initialFeatures.JlpFlashMinimumSaveSectors); WithJlpHardwareVersion(initialFeatures.JlpHardwareVersion); WithLtoFlashFeatures(initialFeatures.LtoFlash); WithBee3Features(initialFeatures.Bee3); WithHiveFeatures(initialFeatures.Hive); } return(this); }
public void UserProgramInformation_SetFeatures_BehavesCorrectly(IProgramFeatures initialFeatures, IProgramFeatures newProgramFeatures, IProgramFeatures expectedProgramFeatures, bool expectedIsModified) { var information = new UserSpecifiedProgramInformation(4, "hey", "1997", (ProgramFeatures)initialFeatures); Assert.False(information.IsModified); information.Features = (ProgramFeatures)newProgramFeatures; Assert.Equal(expectedProgramFeatures, information.Features); Assert.Equal(expectedIsModified, information.IsModified); }
private IProgramFeatures GetInitialProgramFeatures(IProgramDescription programDescription, IProgramInformation programInformation) { IProgramFeatures initialProgramFeatures = null; if (programDescription != null) { initialProgramFeatures = programDescription.Features; } if ((initialProgramFeatures == null) && (programInformation != null)) { initialProgramFeatures = programInformation.Features; } return(initialProgramFeatures); }
/// <inheritdoc /> public IProgramRomInformationBuilder WithFeatures(IProgramFeatures features) { _programRomInformation.Features = features; return(this); }
private static void ValidateFeatures(IProgramFeatures expectedProgramFeatures, IProgramFeatures actualProgramFeatures) { var compareResult = expectedProgramFeatures.CompareTo(actualProgramFeatures); Assert.Equal(0, compareResult); }
public void IncompatibilityFlags_ToProgramFeatures_ProducesExpectedProgramFeatures(IncompatibilityFlags incompatibilityFlags, IProgramFeatures expectedFeatures) { var featuresWithIncompatibility = incompatibilityFlags.ToProgramFeatures(); Assert.Equal(expectedFeatures, featuresWithIncompatibility); }