Skip to content

A library to simplify the test data composing in the source code of tests

License

Notifications You must be signed in to change notification settings

FedoroffSoft/TestMarrow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TestMarrow

Note that the project doesn't have a stable version yet. Necessary functionality is not implemented and not tested yet.

A library to simplify the test data composing in the source code of tests. When you need fill a complex structures for a test then you have to write something like this using C#:

var expected = new List<Struct1> {
    new Struct1 { Name1 = "Marrow", Value1 = 13.07,
        EnumStrcutProp1 = new List<Struct2> {
            new Struct2 {Name2 = "SubMarrow1", Value2 = 4 },
            new Struct2 {Name2 = "SubMarrow2", Value2 = 5 },
        }
    },
    new Struct1 { Value1 = -12 },
    new Struct1 { Name1 = String.Empty, Value1 = -0.43 }
};

TestMarrow allows you to create the same object using this syntax:

String str = @">| Name1             | Value1        | 
                | Marrow            | 13.07         |
               >| EnumStrcutProp1   | Name2         | Value2 | 
                |                   | SubMarrow1    | 4      |
                |                   | SubMarrow2    | 5      |
                | NULL              | -12           |
                | ""                | -.43          |
        ";

var parser = new MarrowParser();
var actual = parser.Parse<List<Struct1>>(str);

About

A library to simplify the test data composing in the source code of tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages