Ejemplo n.º 1
0
        public void OR_NonFlagEnumValues_Error()
        {
            this.dottedIdentifierBinder = new DottedIdentifierBinder(FakeBindMethods.BindMethodThatReturnsEntitySetNode, this.bindingState);

            // NonFlagShape can't OR 2 member values 'Rectangle,foursquare'
            var    castToken = new DottedIdentifierToken("Fully.Qualified.Namespace.NonFlagShape'Rectangle,foursquare'", new DummyToken());
            Action parse     = () => this.dottedIdentifierBinder.BindDottedIdentifier(castToken);

            parse.ShouldThrow <ODataException>().WithMessage(ODataErrorStrings.Binder_IsNotValidEnumConstant("Fully.Qualified.Namespace.NonFlagShape'Rectangle,foursquare'"));
        }