Giter VIP home page Giter VIP logo

Comments (7)

marcusoftnet avatar marcusoftnet commented on June 12, 2024

Ok, after talking this over with @darrencauthon I think I will do the simplest possible thing for now; just strip the reserved chars out.

Here's two scenarios that describes the functionality:

Scenario: Using reserved C# characters in column names
    When I create a dynamic instance from this table
        | C$harp n@me (with strange chars) |
        | A value | 
    Then the CharpNmeWithStrangeChars property should equal 'A value'

Scenario: Only alfa numeric characters, plus underscore is allowed in variable names
       When I create a dynamic instance from this table
        | My_Nice_Variable | My $$ Variable (needs clean up) |
        | A value |  Another value |
    Then the My_Nice_Variable property should equal 'A value'
           And the MyVariableNeedsCleanUp property should equal 'Another value'

Scenario: Using only reserved C# characters in column names
    When I create a dynamic instance from this table
        | $@() |
        | A value | 
    Then an exception with a nice error message about the property only containing reserved chars should be thrown

I will not do the configuration, since this feature is just how the tool behaves. It will go into the documentation instead.

from specflow.assist.dynamic.

marcusoftnet avatar marcusoftnet commented on June 12, 2024

Here's some C-sharp to do the replacement stuff:

using System.Text.RegularExpressions;
string pattern = @"[^a-zA-Z0-9_]";
string replacement = "";
string input = "%ยง@@@@m";
string result = Regex.Replace(input, pattern, replacement);
Console.WriteLine(result);

from specflow.assist.dynamic.

marcusoftnet avatar marcusoftnet commented on June 12, 2024

Feature documented here https://github.com/marcusoftnet/SpecFlow.Assist.Dynamic/wiki/Conventions-used

from specflow.assist.dynamic.

darrencauthon avatar darrencauthon commented on June 12, 2024

Good work!

from specflow.assist.dynamic.

marcusoftnet avatar marcusoftnet commented on June 12, 2024

Thanks Darren!
And thanks for the help.

Fun fact; wrote it from a hospital bed (nasty kidney infection).
First time for me :)

On Mon, Nov 9, 2015 at 8:43 AM Darren Cauthon [email protected]
wrote:

Good work!

โ€”
Reply to this email directly or view it on GitHub
#11 (comment)
.

from specflow.assist.dynamic.

darrencauthon avatar darrencauthon commented on June 12, 2024

Hope you get out of there soon.

Programming puts a silver lining in any down time! So long as we can think and move our fingers, we can be productive. :)

from specflow.assist.dynamic.

marcusoftnet avatar marcusoftnet commented on June 12, 2024

Word!

I'm ok. Get out on Friday. Long IV treatment. That's the reason I'm here.

On Mon, Nov 9, 2015 at 8:46 AM Darren Cauthon [email protected]
wrote:

Hope you get out of there soon.

Programming puts a silver lining in any down time! So long as we can think
and move our fingers, we can be productive. :)

โ€”
Reply to this email directly or view it on GitHub
#11 (comment)
.

from specflow.assist.dynamic.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.