public void GetRandomChoiceReturnsChoice()
        {
            // Arrange
            //not needed

            // Act
            Choice result = RpsGameMethods.GetRandomChoice();

            //Assert
            Assert.IsType <Choice>(result);
        }
Example #2
0
        public void Test1()
        {
            // Arrange

            // Act
            Choice result = RpsGameMethods.GetRandomChoice();


            // Assert
            Assert.IsType <Choice>(result);
        }
Example #3
0
        public void GetUsersIntentReturnsOneOrTwo()
        {
            //Arrange
            // not needed

            //Act
            int result = RpsGameMethods.GetUsersIntent();

            //Assert
            Assert.IsTrue();
        }
Example #4
0
        public void GetRandomChoiceReturnsChoice()
        {
            // Arrange
            //not needed

            // Act
            Choice result = RpsGameMethods.GetRandomChoice();

            //Assert
            // Assert.Equals(Choice.Paper || Choice.Rock || Choice.Scissors, )
            Assert.IsType <Choice>(result);
        }
Example #5
0
        public void GetUsersIntentReturnsOneOrTwo()
        {
            // Arrange
            // not needed

            // Act
            using (var sw = new StringWriter())
            {
                using (var sr = new StringReader("2"))
                {
                    Console.SetOut(sw);
                    Console.SetIn(sr);
                    int intent = RpsGameMethods.GetUserIntent();
                    Assert.Equal(2, intent);
                }
            }
        }