Beispiel #1
0
        public override string Wear()
        {
            if (!_dressHolder.HasOutfit(OutfitType.Shirt))
            {
                throw new ShirtMustBePutOnBeforeHeadwearViolation();
            }

            _dressHolder.AddOutfit(OutfitType.HeadWear);

            return(_temperature == Temperature.Hot ? Outfit.SunVisor.ToDescription() : Outfit.Hat.ToDescription());
        }
Beispiel #2
0
        public override string Wear()
        {
            if (_temperature == Temperature.Hot)
            {
                throw new CannotPutOnSocksWhenHotViolation();
            }

            _dressHolder.AddOutfit(OutfitType.Socks);

            return(Outfit.Socks.ToDescription());
        }
Beispiel #3
0
        public override string Wear()
        {
            if (!_dressHolder.HasOutfit(OutfitType.Shirt))
            {
                throw new ShirtMustBePutOnBeforeJacketViolation();
            }

            if (_temperature == Temperature.Hot)
            {
                throw new CannotPutJacketOnWhenHotViolation();
            }

            _dressHolder.AddOutfit(OutfitType.Jacket);

            return(Outfit.Jacket.ToDescription());
        }
Beispiel #4
0
        public override string Wear()
        {
            if (!_dressHolder.HasOutfit(OutfitType.Pants))
            {
                throw new PantsMustBePutOnBeforeShoesViolation();
            }

            if (_temperature == Temperature.Cold &&
                !_dressHolder.HasOutfit(OutfitType.Socks))
            {
                throw new SocksMustBePutOnBeforeShoesViolation();
            }

            _dressHolder.AddOutfit(OutfitType.FootWear);

            return(_temperature == Temperature.Hot? Outfit.Sandals.ToDescription():Outfit.Boots.ToDescription());
        }
Beispiel #5
0
        public override string Wear()
        {
            _dressHolder.AddOutfit(OutfitType.Pants);

            return(_temperature == Temperature.Hot ? Outfit.Shorts.ToDescription() : Outfit.Pants.ToDescription());
        }