Esempio n. 1
0
        public void GetRandomPointSimpleTest(int height, int width)
        {
            var testEntity = new CoinBuilderForTest(10, _mockCoinFactory.Object);

            for (int i = 0; i < 100; i++)
            {
                var res = testEntity.GetRandomPointWrap(height, width);
                Assert.IsTrue(res.Item1 >= 0 && res.Item1 < height);
                Assert.IsTrue(res.Item2 >= 0 && res.Item2 < width);
            }
        }
Esempio n. 2
0
        public void GetRandomPoint_HeightOrWidthLessOrEqleNull_ThrowArgumentException(int height, int width)
        {
            var testEntity = new CoinBuilderForTest(10, _mockCoinFactory.Object);

            Assert.Throws <ArgumentException>(() => testEntity.GetRandomPointWrap(height, width));
        }