https://github.com/exceptionless/exceptionless.randomdata
Utility class to easily generate random data.
https://github.com/exceptionless/exceptionless.randomdata
c-sharp exceptionless random random-number-generators randomdata randomization
Last synced: 9 months ago
JSON representation
Utility class to easily generate random data.
- Host: GitHub
- URL: https://github.com/exceptionless/exceptionless.randomdata
- Owner: exceptionless
- License: apache-2.0
- Created: 2015-02-20T17:23:32.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2024-06-03T09:23:21.000Z (over 1 year ago)
- Last Synced: 2025-03-21T08:05:56.504Z (10 months ago)
- Topics: c-sharp, exceptionless, random, random-number-generators, randomdata, randomization
- Language: C#
- Homepage: https://www.nuget.org/packages/Exceptionless.RandomData/
- Size: 121 KB
- Stars: 13
- Watchers: 5
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
# Exceptionless.RandomData
[](https://github.com/Exceptionless/Exceptionless.RandomData/actions)
[](https://www.nuget.org/packages/Exceptionless.RandomData/)
[](https://discord.gg/6HxgFCx)
[](https://donorbox.org/exceptionless?recurring=true)
Utility class to easily generate random data. This makes generating good unit test data a breeze!
## Getting Started (Development)
[This package](https://www.nuget.org/packages/Exceptionless.RandomData/) can be installed via the [NuGet package manager](https://docs.nuget.org/consume/Package-Manager-Dialog). If you need help, please contact us via in-app support or [open an issue](https://github.com/exceptionless/Exceptionless.RandomData/issues/new). We’re always here to help if you have any questions!
1. You will need to have [Visual Studio Code](https://code.visualstudio.com/) installed.
2. Open the root folder.
## Using RandomData
Below is a small sample of what you can do, so check it out!
```csharp
private int[] _numbers = new[] { 1, 2, 3, 4, 5 };
private enum _days {
Monday,
Tuesday
}
int value = RandomData.GetInt(1, 5);
// or
value = _numbers.Random();
var day = RandomData.GetEnum<_days>();
```
## Thanks to all the people who have contributed
[](https://github.com/exceptionless/Exceptionless.RandomData/graphs/contributors)