fitSharp
Converting Types For Slim
The Slim framework needs to convert all types used in our tests to and from strings. A number of standard type conversions are built in, or we can add our own Custom Type Converters.

Here are some examples of Slim doing round-trip conversions from a string to a standard type back to a string.

slim domain

Boolean:

checkround trip for typeSystem.Booleanvaluetruetrue
checkround trip for typeSystem.Booleanvaluefalsefalse

Enumerations:

checkround trip for typeSystem.Reflection.BindingFlagsvaluePublicPublic
checkround trip for typeSystem.Reflection.BindingFlagsvalueInstance, PublicInstance, Public

Nullable types:

checkround trip for nullable int11
checkround trip for nullable intnullnull

Dictionaries:

Slim converts a nested two-column table into a dictionary. There is new wiki markup for this:
|my method|!{name:bob, addr:here}|
The method parameter can be any generic Dictionary and the nested cells will be parsed into the generic key and value types.
public void MyMethod(Dictionary<string ,string> dictionary) ...

checklookupkey2in<table> <tr><td>key1</td><td>value1</td></tr> <tr><td>key2</td><td>value2</td></tr> </table>value2
Copyright © 2022 Syterra Software Inc. All rights reserved.