Ejemplo n.º 1
0
        public void EmployeeCanBeCreated()
        {
            //Arange
            Employee john = office.CreateEmployee("John", "*****@*****.**");

            Assert.IsNotNull(john);
        }
Ejemplo n.º 2
0
        public void CanAddAnEmployeeToDb()
        {
            var emp = office.CreateEmployee("Vasi", "*****@*****.**");

            using (EmployeeDbContext db = new EmployeeDbContext())
            {
                db.employees.Add(emp);
                db.SaveChanges();
            }
        }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            var      manager  = new Manager("Mihail", "*****@*****.**");
            Location location = new Location("Sibiu");

            var office = new Office(manager, location);
            var emp    = office.CreateEmployee("Valentin", "*****@*****.**");
            var bt     = emp.GetNewBT();

            bt.Destination = new Location("Brasov");
            MessageBox.Show(string.Format("A new BT was created with ID: {0}", bt.ID));
            bt.Send();
        }
Ejemplo n.º 4
0
        static void CreateBT()
        {
            var      manager  = new Manager("Mihail", "*****@*****.**");
            Location location = new Location("Sibiu");

            var office = new Office(manager, location);
            var emp    = office.CreateEmployee("Valentin", "*****@*****.**");
            var bt     = emp.GetNewBT();

            bt.Destination = new Location("Brasov");
            bt.Send();
            Console.WriteLine(string.Format("A new BT was created with ID: {0}", bt.ID));
        }
Ejemplo n.º 5
0
        public ActionResult CreateBT()
        {
            var      manager  = new Manager("Mihail", "*****@*****.**");
            Location location = new Location("Sibiu");

            var office = new Office(manager, location);
            var emp    = office.CreateEmployee("Valentin", "*****@*****.**");
            var bt     = emp.GetNewBT();

            bt.Destination = new Location("Brasov");
            ViewBag.BtID   = bt.ID;
            bt.Send();
            return(View());
        }
Ejemplo n.º 6
0
        public void Setup()
        {
            manager = new Manager("Mihail", "*****@*****.**");
            Location location = new Location("BT");

            var office = new Office(manager, location);

            emp = office.CreateEmployee("Valentin", "*****@*****.**");

            startingDate = new DateTime(2008, 04, 14);
            endDate      = new DateTime(2008, 04, 30);

            meaningOfTransportation = "bmw";
            AccommodationIsNeeded   = true;
            BusinessTripRepository businessTripRepo = new BusinessTripRepository();

            businessTripRepo.CleanUp();
            EmailServiceLocator.SetEmailService(new EmailServiceTest());
            BusinessTripFormatterServiceLocator.SetFormatter(new BusinessTripFormatterTest());
        }
        public void Setup()
        {
            manager = new Manager("Mihail", "*****@*****.**");
            Location location = new Location("BT");

            var office = new Office(manager, location);

            emp = office.CreateEmployee("Valentin", "*****@*****.**");

            startingDate            = new DateTime(2008, 04, 14);
            endDate                 = new DateTime(2008, 04, 30);
            phone                   = "112";
            bankCard                = "1502 4023 3453 3252";
            meaningOfTransportation = "bmw";
            AccommodationIsNeeded   = true;
            BusinessTripRepository businessTripRepo = new BusinessTripRepository();

            businessTripRepo.CleanUp();
            EmailServiceLocator.SetEmailService(new GmailEmailService());
            BusinessTripFormatterServiceLocator.SetFormatter(new BusinessTripFormatterTest());
        }
Ejemplo n.º 8
0
        public void AnEmployeeCanBeCreated()
        {
            var employee = office.CreateEmployee("X", "X");

            Assert.IsNotNull(employee);
        }