Inheritance Hierarchy
DeltaEngine.Tests.Core FixedRandomTests
Namespace: DeltaEngine.Tests.Core
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The FixedRandomTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | FixedRandomTests | Initializes a new instance of the FixedRandomTests class |
Methods
Name | Description | |
---|---|---|
![]() | FixedValueOutOfRangeThrowsException | |
![]() | Get | |
![]() | GetWithNoFixedValuesAssigned |
Examples
[Test] public void Get() { var random = new FixedRandom(new[] { 0.1f, 0.2f });
[Test] public void GetWithNoFixedValuesAssigned() { var random = new FixedRandom(); Assert.AreEqual(-3, random.Get(-3, 5)); Assert.AreEqual(-7.1f, random.Get(-7.1f, -1.1f)); }
[Test] public void FixedValueOutOfRangeThrowsException() { Assert.Throws<FixedRandom.FixedValueOutOfRange>( () => new FixedRandom(new[] { 0.0f, 1.0f, 0.0f })); Assert.Throws<FixedRandom.FixedValueOutOfRange>(() => new FixedRandom(new[] { -0.01f })); }
See Also