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>")); }
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)); }
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())); }
public void test_WHEN_string_is_not_valid_guid_THEN_exception_is_thrown() { var operand = new GuidValueOperand("asd"); var o = operand.Value; }