├── src
├── DataProviders.Csv.Test
│ ├── CsvFiles
│ │ ├── Simple.csv
│ │ ├── SimpleFail.csv
│ │ ├── SimpleEmpty.csv
│ │ └── Complex.csv
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── CsvDataProviderTest.cs
│ ├── Asserts
│ │ └── MyAssert.cs
│ └── DataProviders.Csv.Test.csproj
├── DataProviders.Csv
│ ├── packages.config
│ ├── CsvDataProviderConfiguration.cs
│ ├── CherrySeed.DataProviders.Csv.nuspec
│ ├── CsvDataProvider.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── CsvFile.cs
│ └── DataProviders.Csv.csproj
├── DataProviders.Gherkin
│ ├── packages.config
│ ├── GherkinDataProviderConfiguration.cs
│ ├── CherrySeed.DataProviders.Gherkin.nuspec
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── GherkinDataProvider.cs
│ └── DataProviders.Gherkin.csproj
├── DataProviders.SpecFlow
│ ├── packages.config
│ ├── App.config
│ ├── CherrySeedConfigurationExtensions.cs
│ ├── CherrySeedExtensions.cs
│ ├── CherrySeed.DataProviders.SpecFlow.nuspec
│ ├── SpecFlowDataProvider.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── DataProviders.SpecFlow.csproj
├── Repositories.Ef
│ ├── packages.config
│ ├── App.config
│ ├── CherrySeed.Repositories.Ef.nuspec
│ ├── EfRepository.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Repositories.Ef.csproj
├── Repositories.Ef.Test
│ ├── packages.config
│ ├── App.config
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── EfRepositoryTest.cs
│ └── Repositories.Ef.Test.csproj
├── CherrySeed
│ ├── DefaultValues
│ │ ├── IDefaultValueProvider.cs
│ │ └── FuncDefaultValueProvider.cs
│ ├── PrimaryKeyIdGeneration
│ │ ├── IPrimaryKeyIdGenerator.cs
│ │ ├── IMainPrimaryKeyIdGeneration.cs
│ │ ├── DatabasePrimaryKeyIdGeneration.cs
│ │ ├── ApplicationPrimaryKeyIdGeneration.cs
│ │ └── ApplicationGeneration
│ │ │ ├── GuidPrimaryKeyIdGenerator.cs
│ │ │ ├── IntegerPrimaryKeyIdGenerator.cs
│ │ │ └── StringPrimaryKeyIdGenerator.cs
│ ├── EntityDataProvider
│ │ ├── IDataProvider.cs
│ │ └── EntityData.cs
│ ├── IdMappings
│ │ ├── IdMappingDescription.cs
│ │ └── IdMappingProvider.cs
│ ├── Repositories
│ │ └── IRepository.cs
│ ├── TypeTransformations
│ │ ├── ITypeTransformation.cs
│ │ ├── GuidTransformation.cs
│ │ ├── BooleanTransformation.cs
│ │ ├── DoubleTransformation.cs
│ │ ├── IntegerTransformation.cs
│ │ ├── DecimalTransformation.cs
│ │ ├── DateTimeTransformation.cs
│ │ ├── TypeTransformationBase.cs
│ │ ├── EnumTransformation.cs
│ │ ├── StringTransformation.cs
│ │ └── TypeTransformationProvider.cs
│ ├── ObjectTransformation
│ │ ├── PropertyHandlers
│ │ │ ├── IPropertyHandler.cs
│ │ │ ├── PrimaryKeyHandler.cs
│ │ │ ├── PropertyHandler.cs
│ │ │ ├── ForeignKeyHandler.cs
│ │ │ └── CopyPropertyValueHandler.cs
│ │ ├── ObjectListTransformation.cs
│ │ ├── PropertyTransformationException.cs
│ │ └── ObjectTransformation.cs
│ ├── EntityMetadata.cs
│ ├── EntitySettings
│ │ ├── IdGenerationSetting.cs
│ │ ├── ReferenceSetting.cs
│ │ ├── DefaultValueSetting.cs
│ │ ├── EntitySetting.cs
│ │ └── PrimaryKeySetting.cs
│ ├── Utils
│ │ ├── DictionaryExtensions.cs
│ │ └── ReflectionUtil.cs
│ ├── Configuration
│ │ ├── CherrySeedConfiguration.cs
│ │ ├── Exceptions
│ │ │ └── ConfigurationException.cs
│ │ ├── SeederConfigurationValidator.cs
│ │ ├── SeederConfiguration.cs
│ │ └── ISeederConfigurationBuilder.cs
│ ├── CherrySeed.nuspec
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── CherrySeeder.cs
│ └── CherrySeed.csproj
├── DataProviders.SpecFlow.Test
│ ├── Entities
│ │ ├── Country.cs
│ │ └── Project.cs
│ ├── packages.config
│ ├── App.config
│ ├── RealisticEnvironment
│ │ ├── Features
│ │ │ ├── Project.feature
│ │ │ └── Project.feature.cs
│ │ └── StepDefinitions
│ │ │ ├── ProjectSteps.cs
│ │ │ └── CherrySeedSupport.cs
│ ├── Common
│ │ └── CherrySeedConfigurationExtensions.cs
│ ├── IntegrationTests
│ │ ├── ProjectObjectMother.cs
│ │ ├── EntityAsserts.cs
│ │ └── SpecFlowExtensionsTests.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
├── DataProviders.Gherkin.Test
│ ├── Testfeature.feature
│ ├── GherkinDataProviderTest.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── DataProviders.Gherkin.Test.csproj
├── CherrySeed.Test
│ ├── Infrastructure
│ │ ├── CultureUtil.cs
│ │ ├── SetupAssemblyInitializer.cs
│ │ ├── Extensions.cs
│ │ ├── CherrySeedDriver.cs
│ │ └── EntityDataBuilder.cs
│ ├── Mocks
│ │ ├── SequentialGuidPrimaryKeyIdGenerator.cs
│ │ ├── DefaultValueProviderMock.cs
│ │ ├── DictionaryDataProvider.cs
│ │ ├── SequentialStringPrimaryKeyIdGenerator.cs
│ │ └── CustomTypeTransformation.cs
│ ├── App.config
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── IntegrationTests
│ │ ├── ConfigurationValidationTests.cs
│ │ ├── ProgressActionTests.cs
│ │ ├── PropertyTransformationTests
│ │ │ ├── EnumPropertyTransformationTests.cs
│ │ │ ├── NullablePropertyTransformationTests.cs
│ │ │ └── NullableEnumPropertyTransformationTests.cs
│ │ ├── CustomTypeTransformationTests.cs
│ │ ├── DefaultValuePropertyTests.cs
│ │ ├── EntitySeedingOrderTests.cs
│ │ └── EntityNameMatchingTests.cs
│ ├── Models
│ │ └── EntityWithSimpleProperties.cs
│ └── Asserts
│ │ └── EntityAsserts.cs
└── CherrySeed.Test.Base
│ ├── Repositories
│ ├── EmptyRepository.cs
│ └── AssertRepository.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── Asserts
│ └── AssertHelper.cs
│ └── CherrySeed.Test.Base.csproj
├── CherrySeed-icon-small.png
├── CherrySeed-Icon-With-Name-small.png
├── resources
└── logos
│ ├── logo-withName-small.png
│ └── logo-withoutName-small.png
├── LICENSE
├── README.md
└── .gitignore
/src/DataProviders.Csv.Test/CsvFiles/Simple.csv:
--------------------------------------------------------------------------------
1 | Field1;Field2;Field3
2 | 1;2;3
3 | 4;5;6
--------------------------------------------------------------------------------
/src/DataProviders.Csv.Test/CsvFiles/SimpleFail.csv:
--------------------------------------------------------------------------------
1 | Field1;Field2;Field3
2 | 1;2
3 | 4;5;6
--------------------------------------------------------------------------------
/src/DataProviders.Csv.Test/CsvFiles/SimpleEmpty.csv:
--------------------------------------------------------------------------------
1 | Field1;Field2;Field3
2 | ;2;
3 | 4;5;6
--------------------------------------------------------------------------------
/CherrySeed-icon-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/altmann/CherrySeed/HEAD/CherrySeed-icon-small.png
--------------------------------------------------------------------------------
/CherrySeed-Icon-With-Name-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/altmann/CherrySeed/HEAD/CherrySeed-Icon-With-Name-small.png
--------------------------------------------------------------------------------
/resources/logos/logo-withName-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/altmann/CherrySeed/HEAD/resources/logos/logo-withName-small.png
--------------------------------------------------------------------------------
/resources/logos/logo-withoutName-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/altmann/CherrySeed/HEAD/resources/logos/logo-withoutName-small.png
--------------------------------------------------------------------------------
/src/DataProviders.Csv.Test/CsvFiles/Complex.csv:
--------------------------------------------------------------------------------
1 | Name;Birthdate;Year;DecimalField
2 | Michael Altmann;2016-06-06;2017;12.12
3 | Simone Altmann;2012-02-02;2011;33.44
--------------------------------------------------------------------------------
/src/DataProviders.Csv/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/DataProviders.Gherkin/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/DataProviders.SpecFlow/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/Repositories.Ef/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/Repositories.Ef.Test/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/CherrySeed/DefaultValues/IDefaultValueProvider.cs:
--------------------------------------------------------------------------------
1 | namespace CherrySeed.DefaultValues
2 | {
3 | public interface IDefaultValueProvider
4 | {
5 | object GetDefaultValue();
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CherrySeed/PrimaryKeyIdGeneration/IPrimaryKeyIdGenerator.cs:
--------------------------------------------------------------------------------
1 | namespace CherrySeed.PrimaryKeyIdGeneration
2 | {
3 | public interface IPrimaryKeyIdGenerator
4 | {
5 | object Generate();
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CherrySeed/EntityDataProvider/IDataProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace CherrySeed.EntityDataProvider
4 | {
5 | public interface IDataProvider
6 | {
7 | List GetEntityDataList();
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CherrySeed/IdMappings/IdMappingDescription.cs:
--------------------------------------------------------------------------------
1 | namespace CherrySeed.IdMappings
2 | {
3 | class IdMappingDescription
4 | {
5 | public string ProviderId { get; set; }
6 | public object RepositoryId { get; set; }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/CherrySeed/PrimaryKeyIdGeneration/IMainPrimaryKeyIdGeneration.cs:
--------------------------------------------------------------------------------
1 | namespace CherrySeed.PrimaryKeyIdGeneration
2 | {
3 | public interface IMainPrimaryKeyIdGeneration
4 | {
5 | IPrimaryKeyIdGenerator Generator { get; set; }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/DataProviders.SpecFlow.Test/Entities/Country.cs:
--------------------------------------------------------------------------------
1 | namespace CherrySeed.DataProviders.SpecFlow.Test.Entities
2 | {
3 | public class Country
4 | {
5 | public int Id { get; set; }
6 | public string Name { get; set; }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/DataProviders.Gherkin.Test/Testfeature.feature:
--------------------------------------------------------------------------------
1 | Feature: Testfeature
2 |
3 | Scenario: Adding testdata
4 | Given the following data of entity 'Person'
5 | | Id | Name | Jahr |
6 | | 1 | Michael | 2016-01-01 |
7 | | 2 | Baba | 2016-01-01 |
--------------------------------------------------------------------------------
/src/DataProviders.SpecFlow.Test/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/CherrySeed/PrimaryKeyIdGeneration/DatabasePrimaryKeyIdGeneration.cs:
--------------------------------------------------------------------------------
1 | namespace CherrySeed.PrimaryKeyIdGeneration
2 | {
3 | public class DatabasePrimaryKeyIdGeneration : IMainPrimaryKeyIdGeneration
4 | {
5 | public IPrimaryKeyIdGenerator Generator { get; set; }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CherrySeed/PrimaryKeyIdGeneration/ApplicationPrimaryKeyIdGeneration.cs:
--------------------------------------------------------------------------------
1 | namespace CherrySeed.PrimaryKeyIdGeneration
2 | {
3 | public class ApplicationPrimaryKeyIdGeneration : IMainPrimaryKeyIdGeneration
4 | {
5 | public IPrimaryKeyIdGenerator Generator { get; set; }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/DataProviders.SpecFlow.Test/Entities/Project.cs:
--------------------------------------------------------------------------------
1 | namespace CherrySeed.DataProviders.SpecFlow.Test.Entities
2 | {
3 | public class Project
4 | {
5 | public int Id { get; set; }
6 | public string Name { get; set; }
7 | public int CountryId { get; set; }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CherrySeed/Repositories/IRepository.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CherrySeed.Repositories
4 | {
5 | public interface IRepository
6 | {
7 | void SaveEntity(object obj);
8 | void RemoveEntities(Type type);
9 | object LoadEntity(Type type, object id);
10 | }
11 | }
--------------------------------------------------------------------------------
/src/CherrySeed/TypeTransformations/ITypeTransformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CherrySeed.TypeTransformations
4 | {
5 | public interface ITypeTransformation
6 | {
7 | object Transform(Type type, string str);
8 | object TransformNullable(Type type, string str);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/CherrySeed/ObjectTransformation/PropertyHandlers/IPropertyHandler.cs:
--------------------------------------------------------------------------------
1 | using CherrySeed.EntitySettings;
2 |
3 | namespace CherrySeed.ObjectTransformation.PropertyHandlers
4 | {
5 | interface IPropertyHandler
6 | {
7 | void Handle(object obj, string propertyName, string propertyValue, EntitySetting entitySetting);
8 | }
9 | }
--------------------------------------------------------------------------------
/src/CherrySeed/TypeTransformations/GuidTransformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CherrySeed.TypeTransformations
4 | {
5 | class GuidTransformation : TypeTransformationBase
6 | {
7 | public override object Transform(Type type, string str)
8 | {
9 | return Guid.Parse(str);
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CherrySeed/TypeTransformations/BooleanTransformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CherrySeed.TypeTransformations
4 | {
5 | class BooleanTransformation : TypeTransformationBase
6 | {
7 | public override object Transform(Type type, string str)
8 | {
9 | return bool.Parse(str);
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CherrySeed/TypeTransformations/DoubleTransformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CherrySeed.TypeTransformations
4 | {
5 | class DoubleTransformation : TypeTransformationBase
6 | {
7 | public override object Transform(Type type, string str)
8 | {
9 | return double.Parse(str);
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CherrySeed/TypeTransformations/IntegerTransformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CherrySeed.TypeTransformations
4 | {
5 | class IntegerTransformation : TypeTransformationBase
6 | {
7 | public override object Transform(Type type, string str)
8 | {
9 | return int.Parse(str);
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CherrySeed/TypeTransformations/DecimalTransformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CherrySeed.TypeTransformations
4 | {
5 | class DecimalTransformation : TypeTransformationBase
6 | {
7 | public override object Transform(Type type, string str)
8 | {
9 | return decimal.Parse(str);
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CherrySeed/TypeTransformations/DateTimeTransformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CherrySeed.TypeTransformations
4 | {
5 | class DateTimeTransformation : TypeTransformationBase
6 | {
7 | public override object Transform(Type type, string str)
8 | {
9 | return DateTime.Parse(str);
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CherrySeed/PrimaryKeyIdGeneration/ApplicationGeneration/GuidPrimaryKeyIdGenerator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CherrySeed.PrimaryKeyIdGeneration.ApplicationGeneration
4 | {
5 | class GuidPrimaryKeyIdGenerator : IPrimaryKeyIdGenerator
6 | {
7 | public object Generate()
8 | {
9 | return Guid.NewGuid();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/CherrySeed.Test/Infrastructure/CultureUtil.cs:
--------------------------------------------------------------------------------
1 | namespace CherrySeed.Test.Infrastructure
2 | {
3 | public class CultureUtil
4 | {
5 | public static void SetGermanCulture()
6 | {
7 | System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("de-DE");
8 | System.Threading.Thread.CurrentThread.CurrentCulture = ci;
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/DataProviders.SpecFlow/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/DataProviders.Gherkin/GherkinDataProviderConfiguration.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace CherrySeed.DataProviders.Gherkin
4 | {
5 | public class GherkinDataProviderConfiguration
6 | {
7 | public GherkinDataProviderConfiguration()
8 | {
9 | FilePaths = new List();
10 | }
11 |
12 | public List FilePaths { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/CherrySeed.Test/Infrastructure/SetupAssemblyInitializer.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.TestTools.UnitTesting;
2 |
3 | namespace CherrySeed.Test.Infrastructure
4 | {
5 | [TestClass]
6 | public class SetupAssemblyInitializer
7 | {
8 | [AssemblyInitialize]
9 | public static void AssemblyInit(TestContext context)
10 | {
11 | CultureUtil.SetGermanCulture();
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/DataProviders.SpecFlow.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/CherrySeed/EntityDataProvider/EntityData.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace CherrySeed.EntityDataProvider
4 | {
5 | public class EntityData
6 | {
7 | public EntityData()
8 | {
9 | Objects = new List>();
10 | }
11 |
12 | public string EntityName { get; set; }
13 | public List> Objects { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/CherrySeed/EntityMetadata.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using CherrySeed.EntitySettings;
4 |
5 | namespace CherrySeed
6 | {
7 | class EntityMetadata
8 | {
9 | public Type EntityType { get; set; }
10 | public List> ObjectsAsDict { get; set; }
11 | public List