public void RandomOrg_GenerateInteger_MinOutOfRange() { RandomOrgClient proxy = new RandomOrgClient(Constants.ApiKey); try { int result = proxy.GetInteger(int.MinValue, 50); } catch (Exception ex) { Assert.IsTrue(ex is ArgumentOutOfRangeException); } }
public void RandomOrg_GenerateInteger() { RandomOrgClient proxy = new RandomOrgClient(Constants.ApiKey); int result = proxy.GetInteger(10, 50); Assert.IsTrue(result >= 10); Assert.IsTrue(result <= 50); }
public void RandomOrg_GenerateInteger_MinMaxSwop() { RandomOrgClient proxy = new RandomOrgClient(Constants.ApiKey); try { int result = proxy.GetInteger(50, 10); } catch (Exception ex) { Assert.IsTrue(ex is ArgumentException); } }