コード例 #1
0
        public void NLSMap_OverrideByEmpty1()
        {
            var nls1 = new NLSMap();

            var content2 = "{eng: {n: 'Cacamber',d: 'It is brown'}, rus: {n: 'Ogurez', d: 'On zeleniy'}}";
            var nls2     = new NLSMap(content2);

            var nls = nls1.OverrideBy(nls2);

            Aver.AreEqual(2, nls.Count);
            Aver.AreEqual("Cacamber", nls["eng"].Name);
            Aver.AreEqual(null, nls["deu"].Name);
            Aver.AreEqual("Ogurez", nls["rus"].Name);
        }
コード例 #2
0
        public void NLSMap_OverrideByEmpty2()
        {
            var content1 = "{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}}";
            var nls1     = new NLSMap(content1);

            var nls2 = new NLSMap();

            var nls = nls1.OverrideBy(nls2);

            Aver.AreEqual(2, nls.Count);
            Aver.AreEqual("Cucumber", nls["eng"].Name);
            Aver.AreEqual("Gurke", nls["deu"].Name);
            Aver.AreEqual(null, nls["rus"].Name);
        }
コード例 #3
0
        public void NLSMap_OverrideBy()
        {
            var content1 = "{eng: {n: 'Cucumber',d: 'It is green'}, deu: {n: 'Gurke', d: 'Es ist grün'}}";
            var nls1     = new NLSMap(content1);

            var content2 = "{eng: {n: 'Cacamber',d: 'It is brown'}, rus: {n: 'Ogurez', d: 'On zeleniy'}}";
            var nls2     = new NLSMap(content2);

            var nls = nls1.OverrideBy(nls2);

            Aver.AreEqual(3, nls.Count);
            Aver.AreEqual("Cacamber", nls["eng"].Name);
            Aver.AreEqual("Gurke", nls["deu"].Name);
            Aver.AreEqual("Ogurez", nls["rus"].Name);
        }