Exemplo n.º 1
0
        public void CreateExcursion()
        {
            var excursion =
                DefaultCreator.createExursion(DefaultCreator.createDateTime());

            Assert.IsNotNull(excursion);
        }
Exemplo n.º 2
0
        public void AddGuide()
        {
            var excursion =
                DefaultCreator.createExursion(DefaultCreator.createDateTime());

            var guide = DefaultCreator.createGuide();

            excursion.addGuide(guide);

            Assert.IsNotEmpty(excursion.getAvailableGuides());
            Assert.AreEqual(guide, excursion.getAvailableGuides()[0]);
        }
Exemplo n.º 3
0
        public void AddExcursion_DateInTourLessThenDateOfExcursions()
        {
            var tourOrder = DefaultCreator.createTourOrder(
                DefaultCreator.createTour()
                , DefaultCreator.createCustomer());

            var excursion =
                DefaultCreator.createExursion(
                    DefaultCreator.createDateTime()
                    );

            tourOrder.AddExcursion(excursion);
        }
Exemplo n.º 4
0
        public void AddExcursion_AddOneExcursion()
        {
            var tourOrder = DefaultCreator.createTourOrder(
                DefaultCreator.createTour()
                , DefaultCreator.createCustomer());

            var excursion =
                DefaultCreator.createExursion(DefaultCreator.createDateTime());

            tourOrder.AddExcursion(excursion);

            Assert.IsTrue(tourOrder.GetExcursion().Contains(excursion));
        }
Exemplo n.º 5
0
        public void CheckGetAvailableLanguages()
        {
            var excursion =
                DefaultCreator.createExursion(DefaultCreator.createDateTime());

            var language = @"Ukranian";

            var guide = DefaultCreator.createGuide(language);

            excursion.addGuide(guide);

            Assert.IsTrue(excursion.getAvailableLanguages().Contains(language));
        }
Exemplo n.º 6
0
        public void TwiceAddOneGuide()
        {
            var excursion =
                DefaultCreator.createExursion(DefaultCreator.createDateTime());

            var guide = DefaultCreator.createGuide();

            excursion.addGuide(guide);

            Assert.IsNotEmpty(excursion.getAvailableGuides());
            Assert.Throws <Exception>(
                () => excursion.addGuide(guide)
                );
        }
Exemplo n.º 7
0
        public void AddExcursion_TwiceAddOneExcursion()
        {
            var tourOrder = DefaultCreator.createTourOrder(
                DefaultCreator.createTour()
                , DefaultCreator.createCustomer());

            Excursion excursion =
                DefaultCreator.createExursion(DefaultCreator.createDateTime());

            tourOrder.AddExcursion(excursion);

            Assert.Throws <ArgumentException>(
                () => tourOrder.AddExcursion(excursion)
                );
        }
Exemplo n.º 8
0
        public void AddExcursion_AddFewExcursion()
        {
            var tourOrder = DefaultCreator.createTourOrder(
                DefaultCreator.createTour()
                , DefaultCreator.createCustomer());

            Excursion excursion1 =
                DefaultCreator.createExursion(DefaultCreator.createDateTime());

            Excursion excursion2 =
                DefaultCreator.createExursion(DefaultCreator.createDateTime());

            tourOrder.AddExcursion(excursion1);
            tourOrder.AddExcursion(excursion2);

            Assert.IsTrue(tourOrder.GetExcursion().Contains(excursion1));
            Assert.IsTrue(tourOrder.GetExcursion().Contains(excursion2));
        }