public void CreateJobPostDBTest()
        {
            //Arrange
            DbJobPost dbJobPost = new DbJobPost();
            Company   company   = new Company("*****@*****.**", "hellopassword");

            company.Id = 1;
            WorkHours workHours = new WorkHours();

            workHours.Id = 1;
            JobCategory jobCategory = new JobCategory();

            jobCategory.Id = 1;


            string   iDate   = "05/05/2018";
            DateTime oDate   = Convert.ToDateTime(iDate);
            JobPost  jobPost = new JobPost(1, "Test job1", "Et job for dig", DateTime.Now, oDate, "Wc Vasker", workHours, "Her", company, jobCategory);



            //Act
            bool inserted = dbJobPost.Create(jobPost);

            //Assert
            Assert.IsTrue(inserted);
        }
Example #2
0
 /// <summary>
 /// Creates the given JobPost object in the database.
 /// </summary>
 /// <param name="obj"></param>
 public void Create(JobPost obj)
 {
     dbJobPost.Create(obj);
 }