Beispiel #1
0
        public void AreCollectionEqualsWithComparerTest()
        {
            PersonalManager PerMgr         = new PersonalManager();
            List <Person>   peopleExpected = new List <Person>();
            List <Person>   peopleActual   = new List <Person>();

            peopleExpected.Add(new Person()
            {
                FirstName = "a", LastName = "b"
            });
            peopleExpected.Add(new Person()
            {
                FirstName = "c", LastName = "d"
            });
            peopleExpected.Add(new Person()
            {
                FirstName = "e", LastName = "f"
            });

            peopleActual = PerMgr.GetPeople();

            CollectionAssert.AreEqual(peopleExpected, peopleActual,
                                      Comparer <Person> .Create((x, y) =>
                                                                x.FirstName == y.FirstName && x.LastName == y.LastName ? 0 : 1));
        }
Beispiel #2
0
 public PersonalGuncelle()
 {
     InitializeComponent();
     _yoneticiService = new YoneticiManager(new YoneticiDal());
     _kisiService     = new KisiManager(new KisiDal());
     _personalService = new PersonalManager(new PersonalDal());
 }
Beispiel #3
0
        public void IsNullTest()
        {
            PersonalManager manager = new PersonalManager();
            Person          per     = manager.CreatePerson("", "Sobrenome", true);

            Assert.IsNull(per);
        }
Beispiel #4
0
        public void IsInstanceOfTypeTest()
        {
            PersonalManager manager = new PersonalManager();
            Person          per     = manager.CreatePerson("Vinicius", "Sobrenome", true);

            Assert.IsInstanceOfType(per, typeof(Supervisor));
        }
Beispiel #5
0
 public ZimmetEkleForm()
 {
     InitializeComponent();
     _urunService     = new UrunManager(new UrunDal());
     _personalService = new PersonalManager(new PersonalDal());
     _markaService    = new MarkaManager(new MarkaDal());
     _zimmetService   = new ZimmetManager(new ZimmetDal());
 }
Beispiel #6
0
        public void IsCollectionTypeTest()
        {
            PersonalManager PerMgr       = new PersonalManager();
            List <Person>   peopleActual = new List <Person>();

            peopleActual = PerMgr.GetSupervisor();

            CollectionAssert.AllItemsAreInstancesOfType(peopleActual, typeof(Supervisor));
        }
Beispiel #7
0
 public StokTakip()
 {
     InitializeComponent();
     _yoneticiService = new YoneticiManager(new YoneticiDal());
     _kisiService     = new KisiManager(new KisiDal());
     _personalService = new PersonalManager(new PersonalDal());
     _markaService    = new MarkaManager(new MarkaDal());
     _urunService     = new UrunManager(new UrunDal());
     _zimmetService   = new ZimmetManager(new ZimmetDal());
     _atikService     = new AtikManager(new AtikDal());
 }
Beispiel #8
0
        public void AreCollectionEquivalentTest()
        {
            PersonalManager PerMgr         = new PersonalManager();
            List <Person>   peopleExpected = new List <Person>();
            List <Person>   peopleActual   = new List <Person>();

            peopleActual = PerMgr.GetPeople();
            peopleExpected.Add(peopleActual[1]);
            peopleExpected.Add(peopleActual[2]);
            peopleExpected.Add(peopleActual[0]);

            CollectionAssert.AreEquivalent(peopleExpected, peopleActual);
        }
Beispiel #9
0
        static void Main(string[] args)
        {
            PersonalManager personalManager = new PersonalManager();

            personalManager.CalculatePermiisionPermisiion(new Entities.Personals
            {
                PersonalId      = 1,
                Name            = "Güner",
                Surname         = "Kalan",
                PermiisionYear  = 2019,
                PermissionType  = "Daily",
                TotalPermission = 28,
                UsedPermiision  = 5
            });

            Console.ReadKey();
        }
Beispiel #10
0
        public void AreCollectionEqualsFailsBecauseNoComparerTest()
        {
            PersonalManager PerMgr         = new PersonalManager();
            List <Person>   peopleExpected = new List <Person>();
            List <Person>   peopleActual   = new List <Person>();

            peopleExpected.Add(new Person()
            {
                FirstName = "a", LastName = "b"
            });
            peopleExpected.Add(new Person()
            {
                FirstName = "c", LastName = "d"
            });
            peopleExpected.Add(new Person()
            {
                FirstName = "e", LastName = "f"
            });

            peopleActual = PerMgr.GetPeople();

            CollectionAssert.AreEqual(peopleExpected, peopleActual);
        }
Beispiel #11
0
        static void Main(string[] args)
        {
            PersonalManager personal = new PersonalManager();

            /*1
             * Customer customer = new Customer{ FirstName = "Mehmet", LastName = "Sensoy", Id = 66 };
             * personal.Add(customer);
             */
            /*2
             * Customer customer = new Customer();
             * customer.FirstName = "Halil";
             * customer.LastName = "Sonmez";
             * customer.Id = 5;
             * personal.Add(customer);
             */
            personal.Add(new Customer {
                Id = 1, FirstName = "Ebubekir", LastName = "Çevik"
            });
            personal.Add(new Student {
                Id = 2, FirstName = "Furkan", LastName = "ateş"
            });

            Console.ReadLine();
        }
Beispiel #12
0
 public PersonalLogin()
 {
     InitializeComponent();
     _personalService = new PersonalManager(new PersonalDal());
 }
Beispiel #13
0
 public TestsController(PersonalManager todoManager, IConfiguration configuration, ILogger <TestsController> logger) : base(todoManager, configuration, logger)
 {
 }
 public BaseController(PersonalManager todoManager, IConfiguration configuration, ILogger logger)
 {
     Logger        = logger;
     Configuration = configuration;
     TodoManager   = todoManager;
 }
Beispiel #15
0
        static void ConfigureUser()
        {
            PersonalManager mgr = new PersonalManager(UserFactories.MachineFactory);

            mgr.Notify("hello");
        }
Beispiel #16
0
 public FileManagerController(PersonalManager manager)
 {
     this._manager = manager;
 }