public void Case12() { var a = new Biblio() { identidiant = 4, nom = "biliotheque", int_article = new Article { Id = 4, body = "body" }, article_comment = new Article { body = "convertible2" } }; a.list_person = new PersonModel { Name = "Franck", Password = "******" }; JsonApiParser parser = this.GetParser(a); parser.AddIncludeQuery("article_comment"); var json = (JObject)parser.GetJson(); Assert.Equal(json["data"]["id"], 4); Assert.Equal(json["data"]["type"], "bibi"); Assert.Equal(json["data"]["attributes"]["name"], "biliotheque"); Assert.Equal(json["data"]["relationships"]["article_comment"]["data"]["type"], "article"); Assert.Equal(json["included"][0]["type"], "article"); Assert.Equal(json["included"][0]["attributes"]["body"], "convertible2"); var biblioModel = new Biblio(); var model = (Biblio) new JsonApiReader(json.ToString(), biblioModel).GetModel(); Assert.Equal(model.identidiant, 4); Assert.Equal(model.nom, "biliotheque"); }
public static Biblio GetBiblio(string nom) { if (Biblio.instance == null) { instance = new Biblio(nom); } return(instance); }
IEnumerator Timer() { Mike1.SetActive(true); yield return(new WaitForSeconds(4.0f)); Mike1.SetActive(false); Mike2.SetActive(true); yield return(new WaitForSeconds(4.0f)); Mike2.SetActive(false); var tempColor = image.color; tempColor.a = 1f; image.color = tempColor; Biblio.SetActive(true); Danse.SetActive(true); Jogging.SetActive(true); Gym.SetActive(true); }