Comments (7)
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.
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.
Feature documented here https://github.com/marcusoftnet/SpecFlow.Assist.Dynamic/wiki/Conventions-used
from specflow.assist.dynamic.
Good work!
from specflow.assist.dynamic.
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.
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.
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)
- Forcing a particular datatype to be created HOT 6
- Add support for additional types, specified by user. HOT 13
- double.NaN is not equal to double.NaN
- Change to hintpath HOT 6
- Convert solution to Visual Studio 2015
- Leading zero removed is this a bug HOT 11
- references mismatch HOT 2
- Indicate data type of values which are different in DynamicSetComparisonException.Differences
- CreateDynamicInstance from a table with a single Field and Value doesn't create the ExpandoObject as expected
- Ability to specify property name casing rules, or a way to match property names HOT 2
- `Property value type conversions` section in wiki needs to be updated with the correct order of operations
- Support .NET Core, .NET Standard #20 HOT 4
- How to create dynamic object with nested children? HOT 11
- Latest specflow versions are not supported
- table value is converting to date time by default HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from specflow.assist.dynamic.