Provides a column of random Decimal values as a data source.
Namespace:
MbUnit.FrameworkAssembly: MbUnit (in MbUnit.dll) Version: 3.2.0.0 (3.2.300.0)
Syntax
| C# |
|---|
public class RandomNumbersAttribute : GenerationDataAttribute |
| Visual Basic (Declaration) |
|---|
Public Class RandomNumbersAttribute _ Inherits GenerationDataAttribute |
Remarks
Initialize the random number generator by setting the 3 named parameters Minimum, Maximum, and Count according to the desired number of values, and to the expected range of numbers.
Examples
[TestFixture] public class MyTestFixture { [Test] public void MyTestMethod([RandomNumbers(Minimum = 0, Maximum = 10, Count = 3)] decimal value) { // This test will run 3 times. It generates at each iteration // a decimal number between 0 and 10. } }
Inheritance Hierarchy
System..::.Object
System..::.Attribute
Gallio.Framework.Pattern..::.PatternAttribute
Gallio.Framework.Pattern..::.DecoratorPatternAttribute
Gallio.Framework.Pattern..::.DataPatternAttribute
MbUnit.Framework..::.DataAttribute
MbUnit.Framework..::.GenerationDataAttribute
MbUnit.Framework..::.RandomNumbersAttribute
System..::.Attribute
Gallio.Framework.Pattern..::.PatternAttribute
Gallio.Framework.Pattern..::.DecoratorPatternAttribute
Gallio.Framework.Pattern..::.DataPatternAttribute
MbUnit.Framework..::.DataAttribute
MbUnit.Framework..::.GenerationDataAttribute
MbUnit.Framework..::.RandomNumbersAttribute
