public void Phase_GetSingleWithFields_Success() { var dict = testConfig.GetDefaultActivityArguments(); dict["PhaseID"] = customFieldsPhase.Id; var act = new GetPhase(); var result = WorkflowInvoker.Invoke(act, dict); Assert.IsTrue((bool)result["Success"]); var json = result["Phase"] as JObject; Assert.AreEqual(customFieldsPhase.Id, json.Value <long>("id")); Assert.AreEqual(customFieldsPhase.Name, json.Value <string>("name")); Assert.AreEqual(customFieldsPhase.Done, json.Value <bool>("done")); var expectedFields = new Dictionary <string, string>(); expectedFields.Add("area", "number"); expectedFields.Add("main_room", "short_text"); expectedFields.Add("construction_started", "datetime"); var fields = json["fields"] as JArray; foreach (var item in fields) { var id = item.Value <string>("id"); var type = item.Value <string>("type"); Assert.AreEqual(expectedFields[id], type); expectedFields.Remove(id); } Assert.AreEqual(0, expectedFields.Count); }
public void Phase_GetSingle_Success() { var dict = testConfig.GetDefaultActivityArguments(); dict["PhaseID"] = simplePhase.Id; var act = new GetPhase(); var result = WorkflowInvoker.Invoke(act, dict); Assert.IsTrue((bool)result["Success"]); var json = result["Phase"] as JObject; Assert.AreEqual(simplePhase.Id, json.Value <long>("id")); Assert.AreEqual(simplePhase.Name, json.Value <string>("name")); Assert.AreEqual(simplePhase.Done, json.Value <bool>("done")); }
void Start() { this.getPhase = gameObject.GetComponent<GetPhase>(); this.fadeManager = GameObject.FindWithTag("FadeManager"); this.mainCamera = GameObject.FindWithTag("MainCamera"); this.systemMessage = GameObject.FindWithTag("SystemMessage"); this.phaseController = GameObject.FindWithTag("PhaseController"); this.seManager = GameObject.FindWithTag("SEManager"); this.bgmPlayer = GameObject.FindWithTag("BGMPlayer"); this.titleText = gameObject.transform.Find("TitleText"); this.startText = gameObject.transform.Find("StartText"); this.blinkTimer = this.blinkInterval; this.fadeOutTimer = this.fadeOutInterval; this.fadeInTimer = this.fadeInInterval; string bgm = "TITLE"; this.bgmPlayer.SendMessage("Play", bgm); }
void Start() { this.getPhase = gameObject.GetComponent<GetPhase>(); this.fadeManager = GameObject.FindWithTag("FadeManager"); this.mainCamera = GameObject.FindWithTag("MainCamera"); this.phaseController = GameObject.FindWithTag("PhaseController"); this.title = GameObject.FindWithTag("Title"); this.seManager = GameObject.FindWithTag("SEManager"); this.bgmPlayer = GameObject.FindWithTag("BGMPlayer"); this.stageText = gameObject.transform.Find("STAGE"); this.trunText = gameObject.transform.Find("TURN"); this.scoreText = gameObject.transform.Find("SCORE"); this.fadeOutTimer = this.fadeOutInterval; this.fadeInTimer = this.fadeInInterval; }
void Start() { this.getPhase = gameObject.GetComponent<GetPhase>(); }
void Start() { this.getPhase = gameObject.GetComponent<GetPhase>(); this.magicPowerBar = GameObject.FindWithTag("MagicPowerBar"); this.seManager = GameObject.FindWithTag("SEManager"); this.infomation = gameObject.transform.Find("Infomation"); //CreatePlayer(); this.yusha = gameObject.transform.Find("PlayerOrb(Clone)/Yusha"); this.minAngle = -90 + limitAngle; this.maxAngle = 90 - limitAngle; }
void Start() { this.getPhase = gameObject.GetComponent<GetPhase>(); this.phaseController = GameObject.FindWithTag("PhaseController"); this.stageController = GameObject.FindWithTag("StageController"); this.fadeManager = GameObject.FindWithTag("FadeManager"); this.mainCamera = GameObject.FindWithTag("MainCamera"); this.systemMessage = GameObject.FindWithTag("SystemMessage"); this.gui = GameObject.FindWithTag("GUI"); this.seManager = GameObject.FindWithTag("SEManager"); this.bgmPlayer = GameObject.FindWithTag("BGMPlayer"); this.score = this.gui.transform.Find("BottomBord/SCORE"); this.fadeOutTimer = this.fadeOutInterval; this.fadeInTimer = this.fadeInInterval; }