public ExtensibileRandomValuePropertyNamerTests() { builderSettings = new BuilderSettings(); randomGenerator = Substitute.For <IRandomGenerator>(); target = new ExtensibleRandomValuePropertyNamer(randomGenerator, builderSettings); bool @bool = true; byte @byte = 1; char @char = 'a'; var dateTime = new DateTime(2009, 01, 01); decimal @decimal = 1m; double @double = 1d; float @float = 1f; Guid guid = new Guid(); int @int = 2; long @long = 3; string phrase = "some text"; sbyte @sbyte = 4; short @short = 5; uint @uint = 6; ulong @ulong = 7; ushort @ushort = 8; MyEnum @enum = MyEnum.EnumValue3; { randomGenerator.Boolean().Returns(@bool); randomGenerator.Byte().Returns(@byte); randomGenerator.Char().Returns(@char); randomGenerator.DateTime().Returns(dateTime); randomGenerator.Decimal().Returns(@decimal); randomGenerator.Double().Returns(@double); randomGenerator.Float().Returns(@float); randomGenerator.Guid().Returns(guid); randomGenerator.Int().Returns(@int); randomGenerator.Long().Returns(@long); randomGenerator.Phrase(50).Returns(@phrase); randomGenerator.SByte().Returns(@sbyte); randomGenerator.Short().Returns(@short); randomGenerator.UInt().Returns(@uint); randomGenerator.ULong().Returns(@ulong); randomGenerator.UShort().Returns(@ushort); randomGenerator.Enumeration(typeof(MyEnum)).Returns(@enum); } }
public void ShouldBeAbleToGenerateByte() { randomGenerator.Byte(); }