예제 #1
0
        public void test_THAT_guid_value_IS_rendered_to_caml_properly()
        {
            var    guid    = new Guid("4feaf1f3-5b04-4d93-b0fc-4e48d0c60eed");
            var    operand = new GuidValueOperand(guid);
            string caml    = operand.ToCaml().ToString();

            Assert.That(caml, Is.EqualTo("<Value Type=\"Guid\">4feaf1f3-5b04-4d93-b0fc-4e48d0c60eed</Value>"));
        }
예제 #2
0
        public void test_THAT_guid_value_IS_successfully_created_from_valid_string()
        {
            var operand = new GuidValueOperand("4feaf1f3-5b04-4d93-b0fc-4e48d0c60eed");

            var guid = new Guid("4feaf1f3-5b04-4d93-b0fc-4e48d0c60eed");

            Assert.That(operand.Value, Is.EqualTo(guid));
        }
예제 #3
0
        public void test_THAT_operand_with_guid_IS_conveted_to_expression_correctly()
        {
            var guid = new Guid("{4feaf1f3-5b04-4d93-b0fc-4e48d0c60eed}");
            var op   = new GuidValueOperand(guid);
            var expr = op.ToExpression();

            Assert.That(expr.ToString(), Is.EqualTo("new Guid(\"4feaf1f3-5b04-4d93-b0fc-4e48d0c60eed\")").Using(new CaseInsensetiveComparer()));
        }
예제 #4
0
 public void test_WHEN_string_is_not_valid_guid_THEN_exception_is_thrown()
 {
     var operand = new GuidValueOperand("asd");
     var o       = operand.Value;
 }