c# - Can Autofixture.Create<int> return a negative value? -


actually, following method returns positive integer:

var fixture = new fixture(); var someint = fixture.create<int>(); 

is possible 1 day, feature evolves , begins return negative integer? or there official reason returns positive integer
if not, there documentation hidden somewhere telling it?

to keep on using autofixture, i'd know if changes foreseen.

the author of autofixture discusses on blog. post specifies current implementation return positive numbers since deemed "safer" in general, don't think change in near future.

the whole point of autofixture generate anonymous test data. asking integer can negative number. 100% safe, wouldn't rely on implicit assumption future implementations return positive numbers. can make more explicit providing custom specimenbuilder:

fixture.customizations.add(new positiveintegerbuilder());

more information custom specimen builders can found here.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -