public void NLSMap_Get_Name() { var content = "{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}}"; var nls = new NLSMap(content); var name = nls.Get(NLSMap.GetParts.Name); Aver.AreEqual("Cucumber", name); name = nls.Get(NLSMap.GetParts.Name, "deu"); Aver.AreEqual("Gurke", name); name = nls.Get(NLSMap.GetParts.Name, "XXX"); Aver.AreEqual("Cucumber", name); name = nls.Get(NLSMap.GetParts.Name, "XXX", dfltLangIso: "ZZZ"); Aver.IsNull(name); }
public void NLSMap_Get_Descr() { var content = "{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}}"; var nls = new NLSMap(content); var descr = nls.Get(NLSMap.GetParts.Description); Aver.AreEqual("It is green", descr); descr = nls.Get(NLSMap.GetParts.Description, "deu"); Aver.AreEqual("Es ist grün", descr); descr = nls.Get(NLSMap.GetParts.Description, "XXX"); Aver.AreEqual("It is green", descr); descr = nls.Get(NLSMap.GetParts.Description, "XXX", dfltLangIso: "ZZZ"); Aver.IsNull(descr); }
public void NLSMap_Get_DescrAndName() { var content = "{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}, rus: { d: 'On Zeleniy'}}"; var nls = new NLSMap(content); var dan = nls.Get(NLSMap.GetParts.DescriptionAndName); Aver.AreEqual("It is green - Cucumber", dan); dan = nls.Get(NLSMap.GetParts.DescriptionAndName, "deu"); Aver.AreEqual("Es ist grün - Gurke", dan); dan = nls.Get(NLSMap.GetParts.DescriptionAndName, "XXX"); Aver.AreEqual("It is green - Cucumber", dan); dan = nls.Get(NLSMap.GetParts.DescriptionAndName, "YYY", concat: "::"); Aver.AreEqual("It is green::Cucumber", dan); dan = nls.Get(NLSMap.GetParts.DescriptionAndName, "rus"); Aver.AreEqual("On Zeleniy", dan); dan = nls.Get(NLSMap.GetParts.DescriptionAndName, "XXX", dfltLangIso: "ZZZ"); Aver.IsNull(dan); }
public void NLSMap_Get_NameAndDescr() { var content = "{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}, rus: { d: 'On Zeleniy'}}"; var nls = new NLSMap(content); var nand = nls.Get(NLSMap.GetParts.NameAndDescription); Aver.AreEqual("Cucumber - It is green", nand); nand = nls.Get(NLSMap.GetParts.NameAndDescription, "deu"); Aver.AreEqual("Gurke - Es ist grün", nand); nand = nls.Get(NLSMap.GetParts.NameAndDescription, "XXX"); Aver.AreEqual("Cucumber - It is green", nand); nand = nls.Get(NLSMap.GetParts.NameAndDescription, "YYY", concat: "::"); Aver.AreEqual("Cucumber::It is green", nand); nand = nls.Get(NLSMap.GetParts.NameAndDescription, "rus"); Aver.AreEqual("On Zeleniy", nand); nand = nls.Get(NLSMap.GetParts.NameAndDescription, "XXX", dfltLangIso: "ZZZ"); Aver.IsNull(nand); }
public void NLSMap_Get_DescrOrName() { var content = "{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}, rus: { d: 'On Zeleniy'}}"; var nls = new NLSMap(content); var dorn = nls.Get(NLSMap.GetParts.DescriptionOrName); Aver.AreEqual("It is green", dorn); dorn = nls.Get(NLSMap.GetParts.DescriptionOrName, "deu"); Aver.AreEqual("Es ist grün", dorn); dorn = nls.Get(NLSMap.GetParts.DescriptionOrName, "XXX"); Aver.AreEqual("It is green", dorn); dorn = nls.Get(NLSMap.GetParts.DescriptionOrName, "rus"); Aver.AreEqual("On Zeleniy", dorn); dorn = nls.Get(NLSMap.GetParts.DescriptionOrName, "XXX", dfltLangIso: "ZZZ"); Aver.IsNull(dorn); }
public void NLSMap_Get_NameOrDescr() { var content = "{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}, rus: { d: 'On Zeleniy'}}"; var nls = new NLSMap(content); var nord = nls.Get(NLSMap.GetParts.NameOrDescription); Aver.AreEqual("Cucumber", nord); nord = nls.Get(NLSMap.GetParts.NameOrDescription, "deu"); Aver.AreEqual("Gurke", nord); nord = nls.Get(NLSMap.GetParts.NameOrDescription, "XXX"); Aver.AreEqual("Cucumber", nord); nord = nls.Get(NLSMap.GetParts.NameOrDescription, "rus"); Aver.AreEqual("On Zeleniy", nord); nord = nls.Get(NLSMap.GetParts.NameOrDescription, "XXX", dfltLangIso: "ZZZ"); Aver.IsNull(nord); }
public void NLSMap_Get_NameOrDescr() { var content="{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}, rus: { d: 'On Zeleniy'}}"; var nls = new NLSMap(content); var nord = nls.Get(NLSMap.GetParts.NameOrDescription); Assert.AreEqual("Cucumber", nord); nord = nls.Get(NLSMap.GetParts.NameOrDescription, "deu"); Assert.AreEqual("Gurke", nord); nord = nls.Get(NLSMap.GetParts.NameOrDescription, "XXX"); Assert.AreEqual("Cucumber", nord); nord = nls.Get(NLSMap.GetParts.NameOrDescription, "rus"); Assert.AreEqual("On Zeleniy", nord); nord = nls.Get(NLSMap.GetParts.NameOrDescription, "XXX", dfltLangIso: "ZZZ"); Assert.IsNull(nord); }
public void NLSMap_Get_Name() { var content="{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}}"; var nls = new NLSMap(content); var name = nls.Get(NLSMap.GetParts.Name); Assert.AreEqual("Cucumber", name); name = nls.Get(NLSMap.GetParts.Name, "deu"); Assert.AreEqual("Gurke", name); name = nls.Get(NLSMap.GetParts.Name, "XXX"); Assert.AreEqual("Cucumber", name); name = nls.Get(NLSMap.GetParts.Name, "XXX", dfltLangIso: "ZZZ"); Assert.IsNull(name); }
public void NLSMap_Get_DescrOrName() { var content="{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}, rus: { d: 'On Zeleniy'}}"; var nls = new NLSMap(content); var dorn = nls.Get(NLSMap.GetParts.DescriptionOrName); Assert.AreEqual("It is green", dorn); dorn = nls.Get(NLSMap.GetParts.DescriptionOrName, "deu"); Assert.AreEqual("Es ist grün", dorn); dorn = nls.Get(NLSMap.GetParts.DescriptionOrName, "XXX"); Assert.AreEqual("It is green", dorn); dorn = nls.Get(NLSMap.GetParts.DescriptionOrName, "rus"); Assert.AreEqual("On Zeleniy", dorn); dorn = nls.Get(NLSMap.GetParts.DescriptionOrName, "XXX", dfltLangIso: "ZZZ"); Assert.IsNull(dorn); }
public void NLSMap_Get_DescrAndName() { var content="{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}, rus: { d: 'On Zeleniy'}}"; var nls = new NLSMap(content); var dan = nls.Get(NLSMap.GetParts.DescriptionAndName); Assert.AreEqual("It is green - Cucumber", dan); dan = nls.Get(NLSMap.GetParts.DescriptionAndName, "deu"); Assert.AreEqual("Es ist grün - Gurke", dan); dan = nls.Get(NLSMap.GetParts.DescriptionAndName, "XXX"); Assert.AreEqual("It is green - Cucumber", dan); dan = nls.Get(NLSMap.GetParts.DescriptionAndName, "YYY", concat: "::"); Assert.AreEqual("It is green::Cucumber", dan); dan = nls.Get(NLSMap.GetParts.DescriptionAndName, "rus"); Assert.AreEqual("On Zeleniy", dan); dan = nls.Get(NLSMap.GetParts.DescriptionAndName, "XXX", dfltLangIso: "ZZZ"); Assert.IsNull(dan); }
public void NLSMap_Get_Descr() { var content="{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}}"; var nls = new NLSMap(content); var descr = nls.Get(NLSMap.GetParts.Description); Assert.AreEqual("It is green", descr); descr = nls.Get(NLSMap.GetParts.Description, "deu"); Assert.AreEqual("Es ist grün", descr); descr = nls.Get(NLSMap.GetParts.Description, "XXX"); Assert.AreEqual("It is green", descr); descr = nls.Get(NLSMap.GetParts.Description, "XXX", dfltLangIso: "ZZZ"); Assert.IsNull(descr); }