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)); }
public PersonalGuncelle() { InitializeComponent(); _yoneticiService = new YoneticiManager(new YoneticiDal()); _kisiService = new KisiManager(new KisiDal()); _personalService = new PersonalManager(new PersonalDal()); }
public void IsNullTest() { PersonalManager manager = new PersonalManager(); Person per = manager.CreatePerson("", "Sobrenome", true); Assert.IsNull(per); }
public void IsInstanceOfTypeTest() { PersonalManager manager = new PersonalManager(); Person per = manager.CreatePerson("Vinicius", "Sobrenome", true); Assert.IsInstanceOfType(per, typeof(Supervisor)); }
public ZimmetEkleForm() { InitializeComponent(); _urunService = new UrunManager(new UrunDal()); _personalService = new PersonalManager(new PersonalDal()); _markaService = new MarkaManager(new MarkaDal()); _zimmetService = new ZimmetManager(new ZimmetDal()); }
public void IsCollectionTypeTest() { PersonalManager PerMgr = new PersonalManager(); List <Person> peopleActual = new List <Person>(); peopleActual = PerMgr.GetSupervisor(); CollectionAssert.AllItemsAreInstancesOfType(peopleActual, typeof(Supervisor)); }
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()); }
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); }
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(); }
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); }
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(); }
public PersonalLogin() { InitializeComponent(); _personalService = new PersonalManager(new PersonalDal()); }
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; }
static void ConfigureUser() { PersonalManager mgr = new PersonalManager(UserFactories.MachineFactory); mgr.Notify("hello"); }
public FileManagerController(PersonalManager manager) { this._manager = manager; }