public void TestSearch() { //arrange Employee e = new Chief("Ivan", "Director", 10000, null, null); Employee e1 = new Manager("Serega", "ScalaDno", 2000, null, null); Employee e2 = new Manager("Nagulak", "Novuy", 1000, null, null); Employee e3 = new Worker("Nagulak2", "Novuy", 1000, null, null); Employee e4 = new Worker("Nagulak2", "Novuy", 1000, null, null); List <Employee> searchbychief = new List <Employee>() { e1, e2, e3, e4 }; List <Employee> searchbyposition = new List <Employee>() { e2, e3, e4 }; List <Employee> searchbysalary = new List <Employee>() { e }; e.Add(e1); e.Add(e2); e1.Add(e3); e1.Add(e4); //assert && act e.Searchable = new SearchByChief(); CollectionAssert.AreEqual(e.Search().ToList(), searchbychief); e.Searchable = new SearchByPosition("Novuy"); CollectionAssert.AreEqual(e.Search().ToList(), searchbyposition); e.Searchable = new SearchBySalary(3000); CollectionAssert.AreEqual(e.Search().ToList(), searchbysalary); }
private static void CreatePrinterCanon() { Tuple <string, string> tuple = ReadingFromConsole(); CanonPrinter canonPrinter = new CanonPrinter(tuple.Item1, tuple.Item2); manager.Add(canonPrinter); }
public void TestManagerCouldGetEmptyBoxCountGivenManagerStoreBoxIntoCabinet() { var manager = new Manager(); var cabinet1 = new Cabinet(10); var cabinet2 = new Cabinet(10); manager.Add(cabinet1); manager.Add(cabinet2); manager.Store(new Bag(), false); Assert.AreEqual(19,manager.GetEmptyBoxCount()); }
public void Manager_Add_TierTwoHierarchy_AddTwoEmployees_SubordinatesCountIsTwo() { var worker1 = new Employee("worker1", 1, WorkerType.EMPLOYEE); var worker2 = new Employee("worker2", 2, WorkerType.EMPLOYEE); var manager = new Manager("manager1", 3, WorkerType.CONTRACTOR); manager.Add(worker1); manager.Add(worker2); Assert.AreEqual(2, manager.Subordinates.Count); }
//////////////////////////////////////////////////////////////////////////// #endregion #region //// Methods /////////// //////////////////////////////////////////////////////////////////////////// protected override void Initialize() { base.Initialize(); // Create and setup Window control. window = new Window(Manager); window.Init(); window.Text = "Getting Started"; window.Width = 480; window.Height = 200; window.Center(); window.Visible = true; // Create Button control and set the previous window as its parent. button = new Button(Manager); button.Init(); button.Text = "OK"; button.Width = 72; button.Height = 24; button.Left = (window.ClientWidth / 2) - (button.Width / 2); button.Top = window.ClientHeight - button.Height - 8; button.Anchor = Anchors.Bottom; button.Parent = window; // Add the window control to the manager processing queue. Manager.Add(window); }
/// </summary> /// Initializes the application's Main Window and passes it off the the GUI Manager. /// </summary> protected virtual void InitMainWindow() // try { // Reset the main window dimensions if needed. if (mainWindow != null) // try { if (!mainWindow.Initialized) { mainWindow.Init(); } mainWindow.Alpha = 255; mainWindow.Width = manager.TargetWidth; mainWindow.Height = manager.TargetHeight; mainWindow.Shadow = false; mainWindow.Left = 0; mainWindow.Top = 0; mainWindow.CloseButtonVisible = true; mainWindow.Resizable = false; mainWindow.Movable = false; mainWindow.Text = Window.Title; mainWindow.Closing += MainWindow_Closing; mainWindow.ClientArea.Draw += MainWindow_Draw; mainWindow.BorderVisible = mainWindow.CaptionVisible = (!systemBorder && !Graphics.IsFullScreen) || (Graphics.IsFullScreen && fullScreenBorder); mainWindow.StayOnBack = true; manager.Add(mainWindow); mainWindow.SendToBack(); } }
protected override void CreateButtons() { base.CreateButtons(); DenyButton.Text = "No"; AffirmButton = new Button(Manager) { Text = "Yes", Top = yPos, Parent = this, }; AffirmButton.Init(); Add(AffirmButton); if (AutoClose) { AffirmButton.Click += (sender, args) => Close(); } Manager.Add(this); // Align the buttons beside each other const int buttonGap = 20; var totalButtonWidth = DenyButton.Width + AffirmButton.Width + buttonGap; var buttonPosLeft = (Width / 2) - (totalButtonWidth / 2); AffirmButton.Left = buttonPosLeft; buttonPosLeft += AffirmButton.Width + buttonGap; DenyButton.Left = buttonPosLeft; }
void Delete_Click(object sender, TomShane.Neoforce.Controls.EventArgs e) { if (MapList.Items.Count == 0) { return; } MapListItem item = (MapList.Items[MapList.ItemIndex] as MapListItem); MapList.Enabled = false; MessageBox confirmDelete = new MessageBox(Manager, MessageBoxType.YesNo, "Are you sure you would like to delete " + item.MapName.Text + " ?\nIt will be lost forever.", "Confirm Deletion"); confirmDelete.Init(); confirmDelete.buttons[0].Text = "Delete"; confirmDelete.buttons[1].Text = "Cancel"; confirmDelete.buttons[0].Color = Color.Red; confirmDelete.Closed += new WindowClosedEventHandler(delegate(object s, WindowClosedEventArgs ev) { if ((s as Dialog).ModalResult == ModalResult.Yes) { IO.DeleteMap(item.MapName.Text); MapList.Items.Remove(item); if (MapList.Items.Count > 0) { MapList.ItemIndex = 0; (MapList.Items[MapList.ItemIndex] as MapListItem).sb.Color = Color.LightGreen; } } MapList.Enabled = true; }); confirmDelete.ShowModal(); Manager.Add(confirmDelete); }
protected override void LoadContent(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IContentManager contentManager) { base.LoadContent(GraphicInfo, factory, contentManager); ngui = Gui as NeoforceGui; manager = ngui.Manager; Window window = new Window(manager); window.Init(); window.Text = "Options"; window.Width = 480; window.Height = 200; window.Center(); window.Visible = true; Button button = new Button(manager); button.Init(); button.Text = "OK"; button.Width = 72; button.Height = 24; button.Left = (window.ClientWidth / 2) - (button.Width / 2); button.Top = window.ClientHeight - button.Height - 8; button.Anchor = Anchors.Bottom; button.Parent = window; button.Click += new TomShane.Neoforce.Controls.EventHandler(button_Click); manager.Add(window); }
public ChatInputForm(Manager _manager, Vector2 _pos, int width) { manager = _manager; Init(_pos, width); Position = _pos; manager.Add(txtBox); }
public void WriteManyEntriesThenAddOneSame() { Manager manager = new Manager(Path.Combine(this.settings.LocalPath, this.settings.Module)); String modulePath = Path.Combine(this.settings.Config.LocalPath, this.settings.Config.Module); LOGGER.Debug("Enter write many"); this.WriteTestEntries(modulePath); this.verifyEntryCount(modulePath, Factory.FileType.Entries, this.cvsEntries.Length); string newEntry = "/MyNewFile.cs/1.1/Sun May 11 09:07:28 2003//"; manager.Add(new Entry(modulePath, newEntry)); this.verifyEntryCount(modulePath, Factory.FileType.Entries, this.cvsEntries.Length + 1); Assert.IsTrue(!Directory.Exists(Path.Combine(this.GetTempPath(), "CVS"))); }
public void Should_hold_cabinet() { var mgr = new Manager(); var cabinet = new Cabinet(1); mgr.Add(cabinet); Assert.IsTrue(mgr.HasEmptyBox()); }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// protected virtual void InitMainWindow() { if (mainWindow != null) { if (!mainWindow.Initialized) { mainWindow.Init(); } mainWindow.Alpha = 255; mainWindow.Width = manager.TargetWidth; mainWindow.Height = manager.TargetHeight; mainWindow.Shadow = false; mainWindow.Left = 0; mainWindow.Top = 0; mainWindow.CloseButtonVisible = true; mainWindow.Resizable = false; mainWindow.Movable = false; mainWindow.Text = this.Window.Title; mainWindow.Closing += new WindowClosingEventHandler(MainWindow_Closing); mainWindow.ClientArea.Draw += new DrawEventHandler(MainWindow_Draw); mainWindow.BorderVisible = mainWindow.CaptionVisible = (!systemBorder && !Graphics.IsFullScreen) || (Graphics.IsFullScreen && fullScreenBorder); mainWindow.StayOnBack = true; manager.Add(mainWindow); mainWindow.SendToBack(); } }
static void Main(string[] args) { // Инициализация интерфейсом ------- Console.WriteLine($"Нужно выводить сообщение Windows? Напишите {false.ToString()} или {true.ToString()}"); bool writeWindows = false; while (!bool.TryParse(Console.ReadLine(), out writeWindows)) { ; } if (writeWindows) { MessageBox.Show("Hello world!"); // Тест, что окошко может выводиться. } Console.WriteLine($"Нужно ли голосове оповещение? Напишите {false.ToString()} или {true.ToString()}"); bool alarm = false; while (!bool.TryParse(Console.ReadLine(), out alarm)) { ; } if (alarm) { Console.Beep(1000, 200); } Manager manager = new Manager(writeWindows, alarm); manager.Start(); // Добавление пользователей ------- Console.WriteLine("Напишите ид ВК пользователей через новую строку каждый:"); do { manager.Add(Console.ReadLine()); } while (true); }
private void creeChampionnat_Click(object sender, RoutedEventArgs e) { if (lesEquipes.Count < 2 || Recup_NomChamp.Text == "") { MessageBox.Show($"Erreur lors de creation de l'équipe {Recup_NomChamp.Text} , vous devez posséder aux moins 2 équipes", "Erreur création équipe", MessageBoxButton.OKCancel, MessageBoxImage.Error); } else { Championnat c1 = new Championnat(Recup_NomChamp.Text); foreach (Equipe e1 in lesEquipes) { if (e1 != null) { c1.AjouteEquipe(e1); } } Manager.Add(sportReçu, c1); lesEquipes.Clear(); lesJoueurs.Clear(); Recup_NomChamp.Text = ""; Recup_NomEq.Text = ""; recup_description.Text = ""; this.Close(); } }
private void AddElement() { using (AddElementDialog dialog = new AddElementDialog()) { dialog.EnsureButtonClick += (sender1, e1) => { List <ElementModel> emb = new List <ElementModel>(); int span = GetSpan(dialog.DataType); for (int j = 0, i = 0; j < dialog.AddNums; i += span, j++) { ElementModel ele = new ElementModel(dialog.IntrasegmentType != string.Empty, dialog.DataType); ele.AddrType = dialog.AddrType; ele.DataType = dialog.DataType; ele.StartAddr = (uint)(dialog.StartAddr + i); ele.IntrasegmentType = dialog.IntrasegmentType; ele.IntrasegmentAddr = dialog.IntrasegmentAddr; emb.Add(ele); } Manager.Add(emb); foreach (ElementModel ele in emb) { CurrentTable.AddElement( Manager.Get(ele)); } dialog.Close(); }; dialog.ShowDialog(); } }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// void btnDown_Click(object sender, EventArgs e) { if (items != null && items.Count > 0) { if (this.Root != null && this.Root is Container) { (this.Root as Container).Add(lstCombo, false); lstCombo.Alpha = Root.Alpha; lstCombo.Left = AbsoluteLeft - Root.Left; lstCombo.Top = AbsoluteTop - Root.Top + Height + 1; } else { Manager.Add(lstCombo); lstCombo.Alpha = Alpha; lstCombo.Left = AbsoluteLeft; lstCombo.Top = AbsoluteTop + Height + 1; } lstCombo.AutoHeight(maxItems); if (lstCombo.AbsoluteTop + lstCombo.Height > Manager.TargetHeight) { lstCombo.Top = lstCombo.Top - Height - lstCombo.Height - 2; } lstCombo.Visible = !lstCombo.Visible; lstCombo.Focused = true; lstCombo.Width = Width; lstCombo.AutoHeight(maxItems); } }
void btnSet_Click(object sender, TomShane.Neoforce.Controls.EventArgs e) { //Set Game's content pack data foreach (ContentPack pack in IO.ContentPacks) { if (pack.Name == (List.Items[List.ItemIndex] as ContentPackListControl).Pack.Name) { Game.ContentPackData = pack; Game.ContentPackName = pack.Name; } } //Save in config Configuration config = ConfigurationManager.OpenExeConfiguration(System.Reflection.Assembly.GetExecutingAssembly().Location); config.AppSettings.Settings["ContentPack"].Value = Game.ContentPackName; config.Save(ConfigurationSaveMode.Modified); //Prompt User MessageBox m = new MessageBox(Manager, MessageBoxType.YesNo, "Your content pack has been set. Please restart the game to apply changes!\nRestart now?", "Apply Changes"); m.Init(); m.Closed += m_Closed; m.ShowModal(); Manager.Add(m); Description.Text = "Customize the graphics of Zarknorth with content packs! [color:Gold]Restart to apply pack![/color]\nCurrent Pack: " + Game.ContentPackName; //Close window Close(); }
private void BtnAddProduct3_Click(object sender, EventArgs e) { Manager <Product, int> product = new Manager <Product, int>(); product.Add(new Product() { title = "test", Count = 20 }); product.Add(new Product() { title = "test", Count = 20 }); product.Add(new Product() { title = "test", Count = 20 }); product.Add(new Product() { title = "test", Count = 20 }); product.Add(new Product() { title = "test", Count = 20 }); product.GetCount.ToString(); Manager <User, int> user = new Manager <User, int>(); user.Add(new User() { Id = 1, FirstName = "Hossein", LastName = "Gholami" }); user.Add(new User() { Id = 1, FirstName = "Hossein", LastName = "Gholami" }); user.Add(new User() { Id = 1, FirstName = "Hossein", LastName = "Gholami" }); user.GetCount.ToString(); }
/// <summary> /// Default Constructor /// </summary> /// <param name="manager"></param> public DetoxChatWindow(Manager manager) : base(manager) { // Initialize class properties.. this._messages = new EventedList <ChatMessage>(); this._messages.ItemAdded += ChatMessages_OnItemAdded; this._isBackgroundVisible = true; // Initialize base control.. base.Init(); base.Width = 350; base.Height = 150; base.Alpha = 255; base.MinimumWidth = 64; base.MinimumHeight = 64; base.CanFocus = true; base.Movable = true; base.Resizable = true; base.ClientArea.Draw += ClientArea_OnDraw; // // // this._chatInput = new TextBox(manager); this._chatInput.Init(); this._chatInput.Anchor = Anchors.Left | Anchors.Right | Anchors.Bottom; this._chatInput.AutoSelection = false; this._chatInput.Detached = false; this._chatInput.Left = 0; this._chatInput.Top = base.Height - this._chatInput.Height; this._chatInput.Visible = true; this._chatInput.KeyDown += ChatInput_OnKeyDown; this._chatInput.FocusGained += ChatInput_OnFocusGained; this._chatInput.FocusLost += ChatInput_OnFocusLost; // // // this._chatScroller = new ScrollBar(manager, Orientation.Vertical) { Anchor = Anchors.Right | Anchors.Top | Anchors.Bottom, Left = base.Width - 16, PageSize = 1, Range = 1, Top = 2, Value = 0 }; this._chatScroller.ValueChanged += ChatScroller_OnValueChanged; this._chatScroller.Init(); // // // base.Add(this._chatInput, false); base.Add(this._chatScroller, false); manager.Add(this); // Update the control positions.. this.PositionControls(); base.Left = 5; base.Top = Terraria.MainGame.Window.ClientBounds.Height - base.Height - 5; }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// private void InitConsole() { TabControl tbc = new TabControl(Manager); Console con1 = new Console(Manager); Console con2 = new Console(Manager); // Setup of TabControl, which will be holding both consoles tbc.Init(); tbc.AddPage("Global"); tbc.AddPage("Private"); tbc.Alpha = 220; tbc.Left = 220; tbc.Height = 220; tbc.Width = 400; tbc.Top = Manager.TargetHeight - tbc.Height - 32; tbc.Movable = true; tbc.Resizable = true; tbc.MinimumHeight = 96; tbc.MinimumWidth = 160; tbc.TabPages[0].Add(con1); tbc.TabPages[1].Add(con2); con1.Init(); con2.Init(); con2.Width = con1.Width = tbc.TabPages[0].ClientWidth; con2.Height = con1.Height = tbc.TabPages[0].ClientHeight; con2.Anchor = con1.Anchor = Anchors.All; con1.Channels.Add(new ConsoleChannel(0, "General", Color.Orange)); con1.Channels.Add(new ConsoleChannel(1, "Private", Color.White)); con1.Channels.Add(new ConsoleChannel(2, "System", Color.Yellow)); // We want to share channels and message buffer in both consoles con2.Channels = con1.Channels; con2.MessageBuffer = con1.MessageBuffer; // In the second console we display only "Private" messages con2.ChannelFilter.Add(1); // Select default channels for each tab con1.SelectedChannel = 0; con2.SelectedChannel = 1; // Do we want to add timestamp or channel name at the start of every message? con1.MessageFormat = ConsoleMessageFormats.All; con2.MessageFormat = ConsoleMessageFormats.TimeStamp; // Handler for altering incoming message con1.MessageSent += new ConsoleMessageEventHandler(con1_MessageSent); // We send initial welcome message to System channel con1.MessageBuffer.Add(new ConsoleMessage("Welcome to Neoforce!", 2)); Manager.Add(tbc); }
private void InitMapPane(HPane mapPane) { int w = Width / Map.Tiles.Length; int h = Height / Map.Tiles[0].Length; for (int x = 0; x < Map.Tiles.Length; ++x) { ListMenu vList = new ListMenu(); vList.ItemsOrientation = Orientation.Vertical; // vList.KeyBoardEnabled = false; mapPane.Add(vList); for (int y = 0; y < Map.Tiles[0].Length; ++y) { MenuItem item = new MenuItem(hiddenTexture, w, h); itemMap.Add(item, new Point(x, y)); vList.AddItem(item); item.FocusGain += (s, a) => item.ImageItem.Color = Color.Silver; item.FocusLoss += (s, a) => item.ImageItem.Color = Color.White; item.Action += (s, a) => { Point p = itemMap[item]; while (Map.RevealedTiles == 0 && Map.Tiles[p.X][p.Y].HasMine) { Map.ShuffleMines(); } if (Map.RevealTile(p.X, p.Y)) { Media.PlaySound(1); } else { Media.PlaySound(0); } if (IsGameOver()) { Manager.Add(CreateGameOverView()); State = ViewState.Suspended; } }; Map.Tiles[x][y].Revealed += (s, a) => { MapTile tile = (MapTile)s; item.IsDisabled = !tile.IsHidden; item.ImageItem.Image = tile.IsHidden ? hiddenTexture : tile.HasMine ? revealedTextures[9] : revealedTextures[tile.GetMineCount()]; // TODO test tile.GetNeighbours().ToList().ForEach(n => CutOutMine(n)); }; } } }
public static void ShowError(string msg, string placementName) { string text = string.Format("There was a problem displaying this ads. {0}. Please try again later.", msg); //Manager.Add(PopupController.POPUP_SCENE_NAME, new PopupData(PopupType.OK, text)); Manager.Add(PopupWithImageController.POPUP_SCENE_NAME, new PopupWithImageData(PopupType.OK, text).SetImagePath(Const.DIALOG_ICON_OPPS_PATH)); FirebaseManager.LogEvent($"AdsError_{placementName}", "message", msg); }
public void Manager_Add_TierThreeHierarchy_ManagersAllHaveSubordinates() { var manager1 = new Manager("manager1", 3, WorkerType.CONTRACTOR); var manager2 = new Manager("manager2", 3, WorkerType.CONTRACTOR); var worker1 = new Employee("worker1", 1, WorkerType.EMPLOYEE); var worker2 = new Employee("worker2", 2, WorkerType.EMPLOYEE); manager1.Add(manager1); manager2.Add(worker1); manager2.Add(worker2); Assert.AreEqual(1, manager1.Subordinates.Count); Assert.AreEqual(2, manager2.Subordinates.Count); }
/// <summary> /// 设置当前运行环境的数据源查询与交互引擎(只读数据引擎)。 /// </summary> /// <param name="engine">数据源查询与交互引擎的实例。</param> public static void SetReadOnly(DbEngine engine) { lock (SyncObjectE) { _Readonly = engine; Manager.Add(NameWithReadonlyEngine, engine); } }
private void AddDisturbancePlugIn() { if (!disturbancePlugInAdded) { Manager.Add(disturbancePlugInInfo); disturbancePlugInAdded = true; } }
public Head() { Position = Settings.DefaultHeadPosition; PreviousPosition = Position; Manager.Add(this); Manager.SetHead(this); CurrentWay = GetControl.GetCurrent(); }
public void Setup() { CustomFlag flag = new CustomFlag { Name = "flags-net", Parameter = "flags-net-parameter" }; manager = CreateManager(); manager.Add("feature:switch:enabled", true); manager.Add("feature:switch:disabled", false); manager.Add("feature:number", 1, true); manager.Add("feature:list", new List <string> { "1", "2", "3" }, true); manager.Add("feature:custom", flag, true); }
public void Initialize() { mainmenu = new Window(manager); mainmenu.Text = "Map Editor"; mainmenu.Top = 105; mainmenu.Left = 695; mainmenu.Width = 105; mainmenu.Height = 120; mainmenu.Resizable = false; mainmenu.CloseButtonVisible = false; mainmenu.Visible = false; manager.Add(mainmenu); btntitles = new Button(manager); btntitles.Text = "Titles Editor"; btntitles.Width = 90; btntitles.Click += new EventHandler(btntitles_Click); btncolusion = new Button(manager); btncolusion.Text = "Collusion"; btncolusion.Top = 20; btncolusion.Width = 90; btncolusion.Click += new EventHandler(btncolusion_Click); btnevent = new Button(manager); btnevent.Text = "Event"; btnevent.Top = 40; btnevent.Width = 90; Button btnSaveAll = new Button(manager); btnSaveAll.Text = "Save All"; btnSaveAll.Top = 60; btnSaveAll.Width = 90; btnSaveAll.Click += new EventHandler(btnSaveAll_Click); mainmenu.Add(btntitles); mainmenu.Add(btncolusion); mainmenu.Add(btnevent); mainmenu.Add(btnSaveAll); InsTitles(); InsCollusion(); }
// Start is called before the first frame update void Awake() { DontDestroyOnLoad(this.gameObject); var ins = Executor.instance; ins = null; ReloadLua(); Manager.Add(this.GetType(), this); }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// public virtual void Show(Control sender, int x, int y) { AutoSize(); base.Show(); if (!Initialized) { Init(); } if (sender != null && sender.Root != null && sender.Root is Container) { (sender.Root as Container).Add(this, false); } else { Manager.Add(this); } this.sender = sender; if (sender != null && sender.Root != null && sender.Root is Container) { Left = x - Root.AbsoluteLeft; Top = y - Root.AbsoluteTop; } else { Left = x; Top = y; } if (AbsoluteLeft + Width > Manager.TargetWidth) { Left = Left - Width; if (ParentMenu != null && ParentMenu is ContextMenu) { Left = Left - ParentMenu.Width + 2; } else if (ParentMenu != null) { Left = Manager.TargetWidth - (Parent != null ? Parent.AbsoluteLeft : 0) - Width - 2; } } if (AbsoluteTop + Height > Manager.TargetHeight) { Top = Top - Height; if (ParentMenu != null && ParentMenu is ContextMenu) { Top = Top + LineHeight(); } else if (ParentMenu != null) { Top = ParentMenu.Top - Height - 1; } } Focused = true; }
public void Should_store_bag_when_has_empty_cabinet() { var mgr = new Manager(); var cabinet = new Cabinet(1); var bag = new Bag(); mgr.Add(cabinet); mgr.Store(bag); Assert.IsFalse(mgr.HasEmptyBox()); }
public MessageBox(Manager manager, MessageBoxType type) : base(manager) { Type = type; buttons = new List <Button>(); Init(); manager.Add(window); Pop(); }
public void TestManagerCouldPickBoxStoredFromManagerGivenManagerStoreBoxIntoCabinet() { var manager = new Manager(); var cabinet = new Cabinet(); manager.Add(cabinet); var bag = new Bag(); var ticket = manager.Store(bag, false); var returnBag = manager.PickBag(ticket, false); Assert.AreEqual(bag, returnBag); }
public void TestManagerCouldStoreBoxGivenManagerHasOneRobotAndOneCabinet() { var manager = new Manager(); var robot = new Robot(); var cabinet = new Cabinet(); robot.Add(cabinet); manager.Add(robot); var ticket = manager.Store(new Bag(), true); Assert.IsNotNull(ticket); }
public void TestManagerShouldHaveEmptyBoxGivenManagerHasOneRobotAndOneCabinet() { var manager = new Manager(); var robot = new Robot(); var cabinet = new Cabinet(); robot.Add(cabinet); manager.Add(robot); Assert.IsTrue(manager.HasEmptyBox()); }
public void TestManagerShouldHaveEmptyBoxGivenManagerHasOneCabinet() { var manager = new Manager(); manager.Add(new Cabinet()); Assert.IsTrue(manager.HasEmptyBox()); }