ToString() public method

public ToString ( ) : string
return string
Ejemplo n.º 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());
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 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());
		}
Ejemplo n.º 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());
		}