public void Create_should_throw_when_increment_is_out_of_range(int increment) { var exception = Record.Exception(() => ObjectIdReflector.Create(1, 1, increment)); var e = exception.Should().BeOfType <ArgumentOutOfRangeException>().Subject; e.ParamName.Should().Be("increment"); }
public void Create_should_throw_when_random_is_out_of_range(long random) { var exception = Record.Exception(() => ObjectIdReflector.Create(1, random, 1)); var e = exception.Should().BeOfType <ArgumentOutOfRangeException>().Subject; e.ParamName.Should().Be("random"); }
public void Create_should_generate_expected_a_b_c(uint timestamp, long random, uint increment, uint expectedA, uint expectedB, uint expectedC) { var objectId = ObjectIdReflector.Create((int)timestamp, random, (int)increment); objectId._a().Should().Be((int)expectedA); objectId._b().Should().Be((int)expectedB); objectId._c().Should().Be((int)expectedC); }
public void Create_should_not_throw_when_arguments_are_valid(long random, int increment) { var _ = ObjectIdReflector.Create(1, random, increment); }