Пример #1
0
        public void DecideWinner_ShotgunVsPistol_ShotgunWins()
        {
            //Arrange
            QaClassToTest helper = new QaClassToTest();

            //Act
            Weapon testWinner = helper.DecideWinner(Weapon.Pistol, helper.WeaponDictionary[Weapon.Pistol], Weapon.Shotgun, helper.WeaponDictionary[Weapon.Shotgun]);

            //Assert
            testWinner.Should().Be(Weapon.Shotgun);
        }
Пример #2
0
        public void CowWrangle_SixCowboysForSevenDays_NoCowsLeft()
        {
            // Arrange
            QaClassToTest myThing = new QaClassToTest();

            // Act
            int actual = myThing.CowWrangle(100, 6, 7);

            // Assert
            actual.Should().Be(0);
        }
Пример #3
0
        public void AdrianneIsFullOfPizza_ThreeSlices_ReturnsTrue()
        {
            //Arrange
            QaClassToTest helper = new QaClassToTest();

            //Act
            bool actual = helper.AdrianneIsFullOfPizza(3);

            //Assert
            actual.Should().BeTrue();
        }
Пример #4
0
        public void Purchase_PurchaseBurrito_ReturnsValidAmount()
        {
            // Arrange
            QaClassToTest helper   = new QaClassToTest();
            double        expected = 10.90;

            // Act
            double actual = helper.Purchase(2, Item.Burrito);

            // Assert
            actual.Should().Be(expected);
        }
Пример #5
0
        public void NickMethodToTest_ValidInput_ExpectedStringReturned()
        {
            // Arrange
            QaClassToTest nicksThing = new QaClassToTest();
            string        expected   = "Whatchu talkin' 'bout, Jimmy? This ain't my dad, this is a Rubix Cube!!! (throw it on the ground)";

            // Act
            string actual = nicksThing.NickMethodToTest("Jimmy", "Rubix Cube", 2);

            // Assert
            actual.Should().BeEquivalentTo(expected);
        }