예제 #1
0
        public void GetSpeedNorwegianBlueParrot_not_nailed()
        {
            var    voltage = 1.5;
            Parrot parrot  = Create(ParrotTypeEnum.NORWEGIAN_BLUE, 0, voltage, false, _baseSpeed);

            Assert.AreEqual(_baseSpeed * voltage, parrot.GetSpeed());
        }
예제 #2
0
        public void GetSpeedOfAfricanParrot_With_No_Coconuts()
        {
            var    baseSpeed = 12.0;
            var    expected  = baseSpeed;
            Parrot parrot    = Create(ParrotTypeEnum.AFRICAN, 0, 0, false, baseSpeed);

            Assert.AreEqual(expected, parrot.GetSpeed());
        }
예제 #3
0
        public void GetSpeedOfEuropeanParrot()
        {
            var    expectedBaseSpeed = _baseSpeed;
            var    numberOfCoconuts  = 0;
            var    voltage           = 0;
            var    isNailed          = false;
            Parrot parrot            = Create(ParrotTypeEnum.EUROPEAN, numberOfCoconuts, voltage, isNailed, _baseSpeed);

            Assert.AreEqual(expectedBaseSpeed, parrot.GetSpeed());
        }
예제 #4
0
 private Parrot Create(ParrotTypeEnum type, int numberOfCoconuts, double voltage, bool isNailed, double baseSpeed)
 {
     return(Parrot.Create(type, numberOfCoconuts, voltage, isNailed, baseSpeed));
 }
예제 #5
0
        public void GetSpeedNorwegianBlueParrot_not_nailed_high_voltage()
        {
            Parrot parrot = Create(ParrotTypeEnum.NORWEGIAN_BLUE, 0, 4, false, _baseSpeed);

            Assert.AreEqual(24.0, parrot.GetSpeed());
        }
예제 #6
0
        public void GetSpeedNorwegianBlueParrot_nailed()
        {
            Parrot parrot = Create(ParrotTypeEnum.NORWEGIAN_BLUE, 0, 0, true, _baseSpeed);

            Assert.AreEqual(0.0, parrot.GetSpeed());
        }
예제 #7
0
        public void GetSpeedOfAfricanParrot_With_Two_Coconuts()
        {
            Parrot parrot = Create(ParrotTypeEnum.AFRICAN, 2, 0, false, _baseSpeed);

            Assert.AreEqual(0.0, parrot.GetSpeed());
        }
예제 #8
0
        public void GetSpeedOfEuropeanParrot()
        {
            Parrot parrot = new Parrot(ParrotTypeEnum.EUROPEAN, 0, 0, false);

            Assert.AreEqual(12.0, parrot.GetSpeed());
        }
예제 #9
0
        public void GetSpeedNorwegianBlueParrot_not_nailed()
        {
            Parrot parrot = new Parrot(ParrotTypeEnum.NORWEGIAN_BLUE, 0, 1.5, false);

            Assert.AreEqual(18.0, parrot.GetSpeed());
        }
예제 #10
0
        public void GetSpeedOfAfricanParrot_With_No_Coconuts()
        {
            Parrot parrot = new Parrot(ParrotTypeEnum.AFRICAN, 0, 0, false);

            Assert.AreEqual(12.0, parrot.GetSpeed());
        }