public void CheckIfCapacityPropertyThrowsExceptions() { Assert.Throws <ArgumentException>(() => { RobotManager robotManager = new RobotManager(-2); }); }
public void ConstructorShouldWorkProperly() { // var robot = new Robot("Alex", 100); var robotManager = new RobotManager(100); Assert.AreEqual(100, robotManager.Capacity); }
public void CapacityShouldThrowExceptionWhenValueIsBelowZero() { Assert.Throws <ArgumentException>(() => { RobotManager robotManager = new RobotManager(-5); }); }
private void Awake() { if (Instance == null) { Instance = this; } }
public void WhenRobotManagerCreated_CountShouldBeZero() { Assert.Throws <ArgumentException>(() => { RobotManager robManager = new RobotManager(-4); }); }
public void CheckWheterCapacityThrowsExceptionIfValueIsNegativeNumber() { Assert.Throws <ArgumentException>(() => { robotManager = new RobotManager(-1); }); }
public void WhenRobotManagerCapacityIsNegative_CapacityExeptionShouldBeThrown() { Assert.Throws <ArgumentException>(() => { RobotManager robomanager = new RobotManager(-5); }); }
public void ShouldThrowWhenRemovingNonExistentRobot() { var robotManager = new RobotManager(1); Assert .Throws <InvalidOperationException>(() => robotManager.Remove("apu")); }
private static void Postfix() { if (!GameplayManager.IsDedicatedServer()) { return; } Debug.Log("MPTweaksLoadScene"); RobotManager.ReadMultiplayerModeFile(); Debug.Log("MPTweaks loaded mode file"); var tweaks = new Dictionary <string, string>() { }; if (NetworkMatch.GetMode() == CTF.MatchModeCTF) { tweaks.Add("ctf.returntimer", CTF.ReturnTimeAmountDefault.ToStringInvariantCulture()); } if (!MPCustomModeFile.PickupCheck) { tweaks.Add("item.pickupcheck", Boolean.FalseString); } tweaks.Add("nocompress.reliable_timestamps", Boolean.TrueString); if (tweaks.Any()) { Debug.LogFormat("MPTweaks: sending tweaks {0}", tweaks.Join()); MPTweaks.Set(tweaks); MPTweaks.Send(); } }
public void RobotManagerCapacityMustThrowExceptionIfValueIsBelowZero() { Assert.Throws <ArgumentException>(() => { RobotManager manager = new RobotManager(-1); }); }
public void Setup() { robot1 = new Robot("Pesho", 100); robot2 = new Robot("Gosho", 200); manager = new RobotManager(2); }
public void AddCannotAddIfCapacityFull() { this.manager = new RobotManager(capacityWithValueOne); this.manager.Add(robotOne); Assert.Throws <InvalidOperationException>(() => this.manager.Add(this.robotTwo)); }
public void CapacityShouldThrownExceptionWithNegativeValue(int capacity) { Assert.Throws <ArgumentException>(() => { this.robotManager = new RobotManager(capacity); }); }
public void RobotsCapacityShouldThrowsExceptionWhenIsBelowZero(int capacity) { Assert.Throws <ArgumentException>(() => { RobotManager manager = new RobotManager(capacity); }); }
public void ConstructorCreateCorrectly() { this.EmptyManager = new RobotManager(capacity); Assert.That(this.manager, Is.Not.Null, "Constructor not correct"); Assert.That(this.manager.Capacity, Is.EqualTo(capacity), "Constructor not correct"); }
public void WorkShouldThrowExceptionWhenIsNameNotFound() { var robotManager = new RobotManager(10); Assert.Throws <InvalidOperationException>(() => robotManager.Work("None", "Job", 5)); }
public void RemoveRobotShouldThrowExceptionWhenRobotIsNull() { var robotManager = new RobotManager(10); Assert.Throws <InvalidOperationException>(() => robotManager.Remove("RoboTest")); }
public void ChargeShouldThrowExceptionWhenRobotIsNotFound() { var robotManager = new RobotManager(10); Assert.Throws <InvalidOperationException>(() => robotManager.Charge("TestName")); }
public void Add_NotEnoughCapacity() { robotManager = new RobotManager(1); robotManager.Add(new Robot("Gosho", 5)); Assert.That(() => robotManager.Add(new Robot("Pesho", 6)), Throws.InvalidOperationException); }
public void RobotManagerConstructorWorksCorrectly() { int capacity = 14; var robotManager = new RobotManager(14); Assert.That(capacity, Is.EqualTo(robotManager.Capacity)); }
public void ConstructorShouldThrowExceptionWithNegativeCapacity() { Assert.Throws <ArgumentException>(() => { RobotManager manager = new RobotManager(-10); }); }
public void CannotAddRobotWhenCapacityIsFull() { var robotmanager = new RobotManager(0); Assert.That(() => robotmanager.Add(Robot1), Throws.InstanceOf <InvalidOperationException>()); }
public void AddRobot_ThrowException() { RobotManager rm = new RobotManager(10); rm.Add(robot); Assert.Throws <InvalidOperationException>(() => rm.Add(robot)); }
public void RobotManagerConstructorShouldInitializeCorrectValue() { RobotManager robotManager = new RobotManager(1); Assert.AreEqual(1, robotManager.Capacity); Assert.AreEqual(0, robotManager.Count); }
// Use this for initialization void Start() { tutorialState = ""; currentState = ""; moveButton = GameObject.Find("MoveButton"); lightButton = GameObject.Find("LightButton"); proximityButton = GameObject.Find("ProximityButton"); soundButton = GameObject.Find("SoundButton"); returnButton = GameObject.Find("ReturnButton"); menuButton = GameObject.Find("MenuButton"); conceptCanvas = GameObject.Find("ConceptCanvas").GetComponent <Canvas>(); tutorialCanvas = GameObject.Find("TutorialCanvas").GetComponent <Canvas>(); locomotionCanvas = GameObject.Find("LocomotionCanvas").GetComponent <Canvas>(); environment = GameObject.Find("Environment"); robotManager = GameObject.Find("RobotManager").GetComponent <RobotManager>(); environment.SetActive(false); returnButton.SetActive(false); //robotController.enabled = false; tutorialCanvas.enabled = false; locomotionCanvas.enabled = false; obstaclesTutorial.SetActive(false); otIRAnatomy.SetActive(false); otIRFunctionality.SetActive(false); otTask.SetActive(false); }
public void DoesNegativeCapacityThrowException() { Assert.Throws <ArgumentException>(() => { robotManager = new RobotManager(-5); }); }
public void ExceptionIsThrown_WhenRobotManagerHasNegativeCapacity() { Assert.Throws <ArgumentException>(() => { RobotManager wrongManager = new RobotManager(-10); }); }
public void InvalidCapacityShouldThrowExceptionWhenNegative() { Assert.That(() => { var robotManager = new RobotManager(-5); }, Throws.ArgumentException); }
public void WhenRobotManagerCapacityIsNegative_CapacityShoudThrowException() { Assert.Throws <ArgumentException>(() => { RobotManager roboManager = new RobotManager(-5); }); }
public frmMain() { InitializeComponent(); RegisterEvents(); robotManager = new RobotManager(); }
// Use this for initialization void Start () { m_gameManager = GameManager.Instance; m_robotManager = m_gameManager.m_RobotPrefab.GetComponent<RobotManager>(); m_canvas = GetComponent<Canvas>(); m_healthSlider = m_canvas.transform.GetChild(0).GetChild(0).GetComponent<Slider>(); m_scoreText = m_canvas.transform.GetChild(1).GetChild(0).GetComponent<Text>(); m_timeText = m_canvas.transform.GetChild(1).GetChild(1).GetComponent<Text>(); }
private static void client_MqttMsgPublishReceived(object sender, MqttMsgPublishEventArgs e) { if (e.Topic == "/RXAUTH") { string newSerial = Encoding.UTF8.GetString(e.Message); var robot = new RobotManager(newSerial); if (Robots == null) Robots = new List<RobotManager>(); Robots.Add(robot); } Console.WriteLine(e.Topic + " : " + Encoding.UTF8.GetString(e.Message)); }
void GameManager_OnMatchStart( ) { m_robotManager = GameManager.Instance.m_Player.GetComponent<RobotManager>( ); }