public void CreateEquipment() { var equipment = new Equipment { EquipmentName = EquipmentType.Laptop, IsAvaliable = true, IsWorking = true }; var equipment1 = new Equipment { EquipmentName = EquipmentType.Phone, IsAvaliable = true, IsWorking = false }; Assert.That(equipment, !Is.Null); Assert.That(equipment1, !Is.Null); equipmentRepository.Create(equipment); equipmentRepository.Create(equipment1); contextManager.BatchSave(); Assert.That(equipment, !Is.Null); Assert.That(equipment.Id, !Is.NaN); Assert.That(equipment.Id, Is.Positive); Assert.IsInstanceOf(typeof(int), equipment.Id); Assert.That(equipment1, !Is.Null); Assert.That(equipment1.Id, !Is.NaN); Assert.That(equipment1.Id, Is.Positive); Assert.IsInstanceOf(typeof(int), equipment1.Id); }
public void CreatePersonWithSkill() { var person = new Person { FirstName = "Marta", LastName = "Kylavech", Adress = "Zhovkva", Gender = Gender.Female, Mail = "*****@*****.**", Phone = "222221" }; var skill = new Skill { Development = "Ruby", Certification = "Nice one", Degree = Degree.Competent }; personSkillRepository.CreatePersonWithSkill(person, skill); contextManager.BatchSave(); Assert.That(personRepository.GetPersonById(person.Id), !Is.Null); Assert.IsInstanceOf(typeof(int), person.Id); Assert.That(person.Id, !Is.NaN); Assert.That(person.Id, Is.Positive); Assert.That(skillRepository.GetSkillById(skill.Id), !Is.Null); Assert.IsInstanceOf(typeof(int), skill.Id); Assert.That(skill.Id, !Is.NaN); Assert.That(skill.Id, Is.Positive); }
public void CreateCustomer() { var customer = new Customer { Name = "Vanka", Mail = "*****@*****.**" }; var customer1 = new Customer { Name = "Oleg", Mail = "*****@*****.**" }; Assert.That(customer, !Is.Null); Assert.That(customer1, !Is.Null); customerRepository.Create(customer); customerRepository.Create(customer1); contextManager.BatchSave(); Assert.That(customer, !Is.Null); Assert.That(customer.Id, !Is.NaN); Assert.That(customer.Id, Is.Positive); Assert.IsInstanceOf(typeof(int), customer.Id); Assert.That(customer1, !Is.Null); Assert.That(customer1.Id, !Is.NaN); Assert.That(customer1.Id, Is.Positive); Assert.IsInstanceOf(typeof(int), customer1.Id); }
public void CreateRole() { var person = new Person { FirstName = "Person1", LastName = "PLN1", Adress = "Kyiv", Phone = "12-121", Skype = "Ololowa" }; var project = new Project { ProjectName = "App1", NumberOfEmployers = 5 }; var rolename = "Useless"; roleRepository.CreateRole(person, project, rolename); contextManager.BatchSave(); Assert.That(personRepository.GetPersonById(person.Id), !Is.Null); Assert.That(person.Id, !Is.NaN); Assert.That(person.Id, Is.Positive); Assert.IsInstanceOf(typeof(int), person.Id); Assert.That(projectRepository.GetProjectById(project.Id), !Is.Null); Assert.That(project.Id, !Is.NaN); Assert.That(project.Id, Is.Positive); Assert.IsInstanceOf(typeof(int), project.Id); }
public void CreatePerson() { var person = new Person { FirstName = "Marta", LastName = "Kylavech", Adress = "Zhovkva", Gender = Gender.Female, Mail = "*****@*****.**", Phone = "222221" }; var person1 = new Person { FirstName = "Ivan", LastName = "Ivanovich", Adress = "Lviv", Gender = Gender.Male, Mail = "*****@*****.**", Phone = "32145" }; personRepository.Create(person); personRepository.Create(person1); contextManager.BatchSave(); Assert.That(personRepository.GetPersonById(person.Id), !Is.Null); Assert.That(person, !Is.Null); Assert.That(person.Id, !Is.NaN); Assert.That(person.Id, Is.Positive); Assert.IsInstanceOf(typeof(int), person.Id); Assert.That(personRepository.GetPersonById(person1.Id), !Is.Null); Assert.That(person1, !Is.Null); Assert.That(person1, !Is.Null); Assert.That(person1.Id, !Is.NaN); Assert.That(person1.Id, Is.Positive); Assert.IsInstanceOf(typeof(int), person1.Id); }
public void CreateProject() { var project = new Project { ProjectName = "Project1", NumberOfEmployers = 10 }; var project1 = new Project { ProjectName = "Project2", NumberOfEmployers = 20 }; projectRepository.Create(project); projectRepository.Create(project1); contextManager.BatchSave(); Assert.That(projectRepository.GetProjectById(project.Id), !Is.Null); Assert.That(project.Id, !Is.NaN); Assert.That(project.Id, Is.Positive); Assert.IsInstanceOf(typeof(int), project.Id); Assert.That(projectRepository.GetProjectById(project1.Id), !Is.Null); Assert.That(project1.Id, !Is.NaN); Assert.That(project1.Id, Is.Positive); Assert.IsInstanceOf(typeof(int), project1.Id); }
public void CreateSkill() { var skill = new Skill { Development = "Java", Certification = "Ololowa" }; var skill1 = new Skill { Development = "Useless", Certification = "Ahahah", Degree = Degree.Competent }; skillRepository.Create(skill); skillRepository.Create(skill1); contextManager.BatchSave(); Assert.That(skillRepository.GetSkillById(skill.Id), !Is.Null); Assert.That(skill.Id, !Is.NaN); Assert.That(skill.Id, Is.Positive); Assert.IsInstanceOf(typeof(int), skill.Id); Assert.That(skillRepository.GetSkillById(skill1.Id), !Is.Null); Assert.That(skill1.Id, !Is.NaN); Assert.That(skill1.Id, Is.Positive); Assert.IsInstanceOf(typeof(int), skill1.Id); }