public void EmployeeDto_Extension_AsEntity_NotNull()
        {
            // Arrange
            var employee = TestHelper.EmployeeDto();

            // Act
            var result = employee.AsEntity();

            // Assert
            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(Employee));

            Assert.IsNotNull(result.User);
            Assert.IsInstanceOfType(result.User, typeof(User));

            Assert.IsNotNull(result.Organization);
            Assert.IsInstanceOfType(result.Organization, typeof(Organization));

            Assert.IsNotNull(result.Branch);
            Assert.IsInstanceOfType(result.Branch, typeof(OrganizationBranch));

            Assert.IsNotNull(result.Department);
            Assert.IsInstanceOfType(result.Department, typeof(OrganizationDepartment));

            Assert.IsNotNull(result.Job);
            Assert.IsInstanceOfType(result.Job, typeof(Job));
        }
Beispiel #2
0
        public void TaskDto_Property_AssignedBy()
        {
            var task  = new TaskDto();
            var value = TestHelper.EmployeeDto();

            task.AssignedBy = value;

            Assert.IsNotNull(task.AssignedBy);
            Assert.IsInstanceOfType(task.AssignedBy, typeof(EmployeeDto));
            Assert.AreEqual(value, task.AssignedBy);
        }