public StarKebabKing(IComponentsFactory _componentsFactory) { componentsFactory = _componentsFactory; name = "Star Kebab King"; dough = "Thin Dough"; sauce = "Marinara Sauce"; toppings.Add("Ham"); }
public FastKebabSmall(IComponentsFactory _componentsFactory) { componentsFactory = _componentsFactory; name = "Fast Kebab Small kebab"; dough = "Thick Dough"; sauce = "Plum Sauce"; toppings.Add("Pickled Onion"); toppings.Add("Tomato"); }
public StarKebabHot(IComponentsFactory _componentsFactory) { componentsFactory = _componentsFactory; name = "Star Kebab Hot"; dough = "Thin Dough"; sauce = "Bruschetta Sauce"; toppings.Add("Reggiano cheese"); toppings.Add("Garlic"); }
public void Throw_ArgumentNullException_WhenFactoryIsNull() { //Assert var historyItemsListMock = new Mock <IHistoryItemsCollection>(); IComponentsFactory factory = null; //Act&&Assert var ex = Assert.ThrowsException <ArgumentNullException>(() => new HistoryEventWriter(historyItemsListMock.Object, factory)); Assert.AreEqual(string.Format(CommandsConsts.NULL_OBJECT, nameof(factory)), ex.ParamName); }
internal ImageOrganizerApplication( ICommandLineParser commandLineParser, IImageManipulatorsFactory imageManipulatorFactory, IComponentsFactory componentsFactory, ISystemContext systemContext) { this.commandLineParser = commandLineParser; this.imageManipulatorFactory = imageManipulatorFactory; this.componentsFactory = componentsFactory; this.systemContext = systemContext; }
private void btnDisplaySpec_Click(object sender, EventArgs e) { if (rbGaming.Checked) componentsFactory = new GamingFactory(); else if (rbBusiness.Checked) componentsFactory = new BusinessFactory(); else if (rbMultimedia.Checked) componentsFactory = new MultimediaFactory(); MachineSpecPrinter currentSpec = new MachineSpecPrinter(componentsFactory, rtbDisplay); currentSpec.print(); }
public CreatePersonCommand(IHistoryEventWriter historyEventWriter, IPersonsCollection personList, IComponentsFactory componentsFactory) { this.historyEventWriter = historyEventWriter ?? throw new ArgumentNullException( string.Format( CommandsConsts.NULL_OBJECT, nameof(historyEventWriter))); this.personList = personList ?? throw new ArgumentNullException( string.Format( CommandsConsts.NULL_OBJECT, nameof(personList))); this.componentsFactory = componentsFactory ?? throw new ArgumentNullException( string.Format( CommandsConsts.NULL_OBJECT, nameof(componentsFactory))); }
public MapReduceManager ( string dataFilePath, int nMappers, int nReducers, BlockingCollection <TIn> blockingCollection, IComponentsFactory componentsFactory, IDataReader <TIn> dataReader ) { _dataFilePath = dataFilePath; _nMappers = nMappers; _nReducers = nReducers; _blockingCollection = blockingCollection; _componentsFactory = componentsFactory; _dataReader = dataReader; }
public void AddsNewComponentCorrectly() { Random rnd = new Random(); string randomComponentName = BSManager.ComponentsNamesDict.Keys.ElementAt(rnd.Next(BSManager.ComponentsNamesDict.Keys.Count)); IComponentsFactory correspondingComponentFactory = BSManager.ComponentsNamesDict[randomComponentName]; Rectangle componentRectangle = new Rectangle(rnd.Next(), rnd.Next(), rnd.Next(), rnd.Next()); BSBaseComponent expectedComp = correspondingComponentFactory.NewComponent(componentRectangle); BSManager.AddComponentWithNameAndRectangle(randomComponentName, componentRectangle); IList <BSBaseComponent> actualCompsList = BSManager.Components; Assert.AreEqual(1, actualCompsList.Count); BSBaseComponent actualComp = actualCompsList.First(); Assert.AreEqual(expectedComp.GetType(), actualComp.GetType()); Assert.AreEqual(componentRectangle, actualComp.OnScreenRectangle); }
public static IComponentsFactory CreateComponentsFactory(string sourceTitle) { if (sourceTitle == null) { throw new ArgumentNullException(nameof(sourceTitle)); } IComponentsFactory componentsFactory = null; switch (sourceTitle) { case "belta.by": componentsFactory = new BeltaComponentsFactory(); break; case "bbc.com": componentsFactory = new BBCComponentFactory(); break; } return(componentsFactory); }
private void btnDisplaySpec_Click(object sender, EventArgs e) { if (rbGaming.Checked) { componentsFactory = new GamingFactory(); } else if (rbBusiness.Checked) { componentsFactory = new BusinessFactory(); } else if (rbMultimedia.Checked) { componentsFactory = new MultimediaFactory(); } MachineSpecPrinter currentSpec = new MachineSpecPrinter(componentsFactory, rtbDisplay); currentSpec.print(); }
public FakeHistoryEventWriter(IHistoryItemsCollection historyItemsList, IComponentsFactory factory) : base(historyItemsList, factory) { }
public CreateTeamCommand(IHistoryEventWriter historyEventWriter, IWIMTeams wimTeams, IComponentsFactory componentsFactory) { this.historyEventWriter = historyEventWriter ?? throw new ArgumentNullException(nameof(historyEventWriter)); this.wimTeams = wimTeams ?? throw new ArgumentNullException(nameof(wimTeams)); this.componentsFactory = componentsFactory ?? throw new ArgumentNullException(nameof(componentsFactory)); }
public WebFolderToCsFilesConverter(IComponentsFactory factory, IHtmlsFinder finder) { _finder = finder; _factory = factory; }
public MachineSpecPrinter(IComponentsFactory componentsFactory, RichTextBox displayBox) { this.componentsFactory = componentsFactory; this.displayBox = displayBox; }
public CreateBugCommand(IHistoryEventWriter historyEventWriter, IComponentsFactory componentsFactory, IGetters getter) { this.historyEventWriter = historyEventWriter ?? throw new ArgumentNullException(nameof(historyEventWriter)); this.componentsFactory = componentsFactory ?? throw new ArgumentNullException(nameof(componentsFactory)); this.getter = getter ?? throw new ArgumentNullException(nameof(getter)); }
public ImageSorter(IComponentsFactory componentsFactory, ISystemContext systemContext) { this.componentsFactory = componentsFactory; this.systemContext = systemContext; this.OnMessageSent(new MessageSentEventArgs(Resources.Info_ImageSorterInitialized, MessageType.Information)); }
public CommandParser(IComponentsFactory factory) { this.factory = factory; }
public HistoryEventWriter(IHistoryItemsCollection historyItemsList, IComponentsFactory factory) { this.historyItemsList = historyItemsList ?? throw new ArgumentNullException(string.Format(CommandsConsts.NULL_OBJECT, nameof(historyItemsList))); this.factory = factory ?? throw new ArgumentNullException(string.Format(CommandsConsts.NULL_OBJECT, nameof(factory))); }
public IImageDirectoryMerger CreateImageDirectoryMerger( IComponentsFactory componentsFactory, ISystemContext systemContext) { return((IImageDirectoryMerger) new ImageDirectoryMerger(componentsFactory, systemContext)); }
public ScanCommand(IComponentsFactory[] factories) { _factories = factories; }