Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when creating a collection of simple objects #94

Open
HerrLoesch opened this issue Jan 23, 2017 · 0 comments
Open

Exception when creating a collection of simple objects #94

HerrLoesch opened this issue Jan 23, 2017 · 0 comments
Labels

Comments

@HerrLoesch
Copy link
Collaborator

I wanted to create a list of objects. They must be of type object. I was not able to create them with Randomizer.Create(110) because there was no type Object registered.

Exception:

System.TypeInitializationException : Der Typeninitialisierer für "System.Object" hat eine Ausnahme verursacht.
----> System.Exception : The type [Object] was not registered in the randomizer.
bei Tynamix.ObjectFiller.Filler1.GetRandomValue(Type propertyType, FillerSetupItem setupItem) bei Tynamix.ObjectFiller.Filler1.CreateAndFillObject(Type type, FillerSetupItem currentSetupItem, HashStack1 typeTracker) bei Tynamix.ObjectFiller.Filler1.Create()
bei Tynamix.ObjectFiller.Filler`1.Create(Int32 count)

Then I tried this setup:

            Filler<object> objectFiller = new Filler<object>();
            objectFiller.Setup().OnType<object>().CreateInstanceOf<string>();

with this call:

objectFiller.Create(110)

and got the same Exception.

@HerrLoesch HerrLoesch added the bug label Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant