ToString() публичный Метод

public ToString ( ) : string
Результат string
Пример #1
0
        public void SerializeChain()
        {
            var crit = new Criterium
            {
                ParamName = "par1",
                Modifier  = "type1",
                Operator  = Operator.CHAIN,
                Operand   =
                    new Criterium
                {
                    ParamName = "par2",
                    Operator  = Operator.CHAIN,
                    Operand   =
                        new Criterium {
                        ParamName = "par3", Modifier = "text", Operator = Operator.EQ, Operand = new StringValue("hoi")
                    }
                }
            };

            Assert.AreEqual("par1:type1.par2.par3:text=hoi", crit.ToString());
        }
Пример #2
0
        public void SerializeCriterium()
        {
            var crit = new Criterium {
                ParamName = "paramX", Modifier = "modif1", Operand = new NumberValue(18), Operator = Operator.GTE
            };

            Assert.AreEqual("paramX:modif1=ge18", crit.ToString());

            crit = new Criterium {
                ParamName = "paramX", Operand = new NumberValue(18)
            };
            Assert.AreEqual("paramX=18", crit.ToString());

            crit = new Criterium {
                ParamName = "paramX", Operator = Operator.ISNULL
            };
            Assert.AreEqual("paramX:missing=true", crit.ToString());

            crit = new Criterium {
                ParamName = "paramX", Operator = Operator.NOTNULL
            };
            Assert.AreEqual("paramX:missing=false", crit.ToString());
        }
Пример #3
0
		public void SerializeCriterium()
		{
			var crit = new Criterium { ParamName = "paramX", Modifier = "modif1", Operand = new NumberValue(18), Operator = Operator.GTE };
			Assert.AreEqual("paramX:modif1=ge18", crit.ToString());

			crit = new Criterium { ParamName = "paramX", Operand = new NumberValue(18) };
			Assert.AreEqual("paramX=18", crit.ToString());

			crit = new Criterium { ParamName = "paramX", Operator = Operator.ISNULL };
			Assert.AreEqual("paramX:missing=true", crit.ToString());

			crit = new Criterium { ParamName = "paramX", Operator = Operator.NOTNULL };
			Assert.AreEqual("paramX:missing=false", crit.ToString());
		}
Пример #4
0
		public void SerializeChain()
		{
			var crit = new Criterium
			{
				ParamName = "par1",
				Modifier = "type1",
				Operator = Operator.CHAIN,
				Operand =
					new Criterium
					{
						ParamName = "par2",
						Operator = Operator.CHAIN,
						Operand =
							new Criterium { ParamName = "par3", Modifier = "text", Operator = Operator.EQ, Operand = new StringValue("hoi") }
					}
			};

			Assert.AreEqual("par1:type1.par2.par3:text=hoi", crit.ToString());
		}