Esempio n. 1
0
        public void FirstRoundReturnsAnyGesture()
        {
            _Random.Set(0);
            var g1 = _Strategy.GetGesture().Result;

            _Random.Set(1);
            var g2 = _Strategy.GetGesture().Result;

            _Random.Set(2);
            var g3 = _Strategy.GetGesture().Result;
            var g  = new HandGesture[] { g1, g2, g3 };

            Assert.That(g.All(k => _Gestures.Contains(k)), @"The first move should generate any gesture with equal probability");
        }
Esempio n. 2
0
        public void GetGesturesFromRandom(int rnd, HandGesture expectedGesture)
        {
            _Random.Set(rnd);
            var g = _Strategy.GetGesture().Result;

            Assert.AreEqual(expectedGesture, g, $@"The random index {rnd} should return the gesture {expectedGesture}.");
        }