public void AddReport() { List <Document> data = new List <Document> { new Document { IdDocument = 9, Name = "DoctoProyecto.docx" } }; DbSet <Document> _mockSet = DbContextMock.GetQueryableMockDbSet(data, x => x.IdDocument); ProfessionalPracticesContext _mockContext = DbContextMock.GetContext(_mockSet); UnitOfWork unitOfWork = new UnitOfWork(_mockContext); Document documentUpdate = unitOfWork.Documents.Get(9); documentUpdate.Name = "DoctoProyecto.docx"; documentUpdate.RouteSave = "C:/Users/MARTHA/Documents/Activity/1"; documentUpdate.TypeDocument = "Reporte Mensual"; documentUpdate.TypeDocument = "Reporte Parcial"; DateTime deliveryDate = DateTime.Now; documentUpdate.DeliveryDate = deliveryDate; ActivityPracticioner activityPracticionerUpdate = _unitOfWork.ActivityPracticioners.Get(9); activityPracticionerUpdate.Activity.ActivityStatus = ActivityStatus.ACTIVE; activityPracticionerUpdate.Answer = "Entrega"; int expected = 1; int actual = _data.Count; Assert.AreEqual(expected, actual); }
public void RegisterSchedulingActivities_Exists() { List <SchedulingActivity> schedulingActivities = new List <SchedulingActivity>() { new SchedulingActivity { Month = "Febrero", Activity = "Análisis de requerimientos, recopilación de información, documentación y revisión de procedimientos.Capacitación en el IDE de desarrollo y metodología.", IdProject = 3 }, new SchedulingActivity { Month = "Mayo", Activity = "Pruebas y ajustes", IdProject = 3 } }; DbSet <SchedulingActivity> mockSet = DbContextMock.GetQueryableMockDbSet(schedulingActivities, s => s.IdSchedulingActivity); ProfessionalPracticesContext mockContext = DbContextMock.GetContext(mockSet); UnitOfWork unitOfWork = DbContextMock.GetUnitOfWork(mockContext); unitOfWork.SchedulingActivities.AddRange(schedulingActivities); int expected = 4; int actual = schedulingActivities.Count; Assert.AreEqual(expected, actual); }
public void TestInitialize() { _practicioners = new List <Practicioner> { new Practicioner { Enrollment = "zS18012124", } }; _request = new List <RequestProject> { new RequestProject { IdRequestProject = 1, RequestDate = DateTime.Now, IdProject = 1, Enrollment = "zS18012124", RequestStatus = RequestStatus.REQUESTED } }; _mockSetPracticioners = DbContextMock.GetQueryableMockDbSet(_practicioners, p => p.Enrollment); _mockContext = DbContextMock.GetContext(_mockSetPracticioners); _mockSetRequest = DbContextMock.GetQueryableMockDbSet(_request, r => r.IdRequestProject); _mockContext = DbContextMock.GetContext(_mockSetRequest); _unitOfWork = new UnitOfWork(_mockContext); }
public void TestInitialize() { string dateConvert = "2021-04-04 12:14:11"; IFormatProvider format = new System.Globalization.CultureInfo("es-ES", false); DateTime date = new DateTime(); date = DateTime.ParseExact(dateConvert, "yyyy-MM-dd HH:mm:ss", format); _data = new List <ActivityPracticioner> { new ActivityPracticioner { IdActivityPracticioner = 9, Qualification = 0, ActivityPracticionerStatus = ActivityPracticionerStatus.NOTQUALIFIED, Enrollment = "zS18012149", Activity = new Activity { IdActivity = 1, Name = "Primer reporte parcial", ActivityType = ActivityType.PartialReport, ActivityStatus = ActivityStatus.ACTIVE, Description = "Entregar el primer reporte parcial corresponsdiente a 200 horas.", ValueActivity = 10, StartDate = new DateTime(), FinishDate = date, StaffNumberTeacher = "5678" } } }; DbSet <ActivityPracticioner> _mockSet = DbContextMock.GetQueryableMockDbSet(_data, x => x.IdActivityPracticioner); ProfessionalPracticesContext _mockContext = DbContextMock.GetContext(_mockSet); _unitOfWork = new UnitOfWork(_mockContext); }
public void SoftDeleteResponsibleProject_Exists() { List <ResponsibleProject> responsiblesProject = new List <ResponsibleProject>(); DbSet <ResponsibleProject> mockSet = DbContextMock.GetQueryableMockDbSet(responsiblesProject, r => r.EmailAddress); ProfessionalPracticesContext mockContext = DbContextMock.GetContext(mockSet); UnitOfWork unitOfWork = DbContextMock.GetUnitOfWork(mockContext); ResponsibleProject responsibleProject = new ResponsibleProject { IdResponsibleProject = 1, Name = "Gustavo Antonio", LastName = "Ruiz Zapata", EmailAddress = "*****@*****.**", Charge = "Jefe de departamento de Tecnología Educativa" }; responsiblesProject.Add(responsibleProject); ResponsibleProject responsobleProjectCurrent = unitOfWork.ResponsibleProjects.Get(responsibleProject.IdResponsibleProject); if (responsobleProjectCurrent != null) { responsobleProjectCurrent.ResponsibleProjectStatus = ResponsibleProjectStatus.INACTIVE; } responsiblesProject.Remove(responsibleProject); int expected = 0; int actual = responsiblesProject.Count; Assert.AreEqual(expected, actual); }
public void TestInitialize() { _data = new List <Teacher> { new Teacher { StaffNumber = "124987", User = new User { Name = "Jorge Octavio", LastName = "Ocharan Hernandez", Gender = Gender.MALE, UserStatus = UserStatus.ACTIVE, PhoneNumber = "2284564791", UserType = UserType.Teacher, Email = "*****@*****.**", AlternateEmail = "*****@*****.**", Account = new Account { Username = "******", Password = "******", FirstLogin = true } } } }; DbSet <Teacher> _mockSet = DbContextMock.GetQueryableMockDbSet(_data, x => x.StaffNumber); ProfessionalPracticesContext _mockContext = DbContextMock.GetContext(_mockSet); _unitOfWork = new UnitOfWork(_mockContext); }
public void AddActivityCorrect() { List <Activity> actvities = new List <Activity>(); DbSet <Activity> mockSet = DbContextMock.GetQueryableMockDbSet(actvities, a => a.IdActivity); ProfessionalPracticesContext mockContext = DbContextMock.GetContext(mockSet); UnitOfWork unitOfWork = DbContextMock.GetUnitOfWork(mockContext); string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); Activity newActivity = new Activity { IdGroup = 1, Name = "Actividad 2 reporte mensual", ActivityType = ActivityType.MonthlyReport, ActivityStatus = ActivityStatus.ACTIVE, IdActivity = 2, Description = " Deberan de subir su primer reporte mensual", ValueActivity = 100, StartDate = Convert.ToDateTime(date), FinishDate = Convert.ToDateTime(date), teacher = new Teacher { StaffNumber = "12345" } }; unitOfWork.Activities.Add(newActivity); int expected = 1; int actual = actvities.Count; Assert.AreEqual(expected, actual); }
public void RegisterActivitiesMade_Exists() { DateTime localDate = DateTime.Now; List <ActivityMade> activitiesMades = new List <ActivityMade>(); DbSet <ActivityMade> mockSet = DbContextMock.GetQueryableMockDbSet(activitiesMades, p => p.IdActivity); ProfessionalPracticesContext mockContext = DbContextMock.GetContext(mockSet); UnitOfWork unitOfWork = DbContextMock.GetUnitOfWork(mockContext); List <ActivityMade> newActivities = new List <ActivityMade> { new ActivityMade { Name = "Pruebas", IdPartialReport = 1, PlannedWeek = "S1 S2 S3", RealWeek = "S1 S2 S3" }, new ActivityMade { Name = "Modelo de dominio", IdPartialReport = 1, PlannedWeek = "S1 S2 S3", RealWeek = "S1 S2 S3" } }; unitOfWork.ActivityMades.AddRange(newActivities); int expected = 2; int actual = newActivities.Count; Assert.AreEqual(expected, actual); }
public void TestInitialize() { _teacherValidator = new TeacherValidator(true); _teachers = new List <Teacher> { new Teacher { StaffNumber = "54321", RegistrationDate = DateTime.Now, User = new User { IdUser = 1, Name = "Alejandra", LastName = "Luna Ceballos", Gender = Gender.FEMALE, UserStatus = UserStatus.ACTIVE, Email = "*****@*****.**", AlternateEmail = "*****@*****.**", PhoneNumber = "2281213456" } } }; _mockSet = DbContextMock.GetQueryableMockDbSet(_teachers, t => t.StaffNumber); _mockContext = DbContextMock.GetContext(_mockSet); _unitOfWork = DbContextMock.GetUnitOfWork(_mockContext); }
public void TestInitialize() { _data = new List <Coordinator> { new Coordinator { StaffNumber = "XGC16215", RegistrationDate = DateTime.Now, DischargeDate = null, User = new User { IdUser = 1, Name = "Eduardo Aldair", LastName = "Hernández Solís", Gender = Gender.MALE, UserStatus = UserStatus.ACTIVE, Email = "*****@*****.**", AlternateEmail = "*****@*****.**", PhoneNumber = "2298046218", Account = new Account { Username = "******", Password = "******", FirstLogin = true } } } }; _mockSet = DbContextMock.GetQueryableMockDbSet(_data, x => x.StaffNumber); _mockContext = DbContextMock.GetContext(_mockSet); _repository = new CoordinatorRepository(_mockContext); _unitOfWork = new UnitOfWork(_mockContext); }
public void TestInitialize() { _data = new List <Practicioner> { new Practicioner { Enrollment = "zS18012124", Term = "FEBRERO - JULIO 2021", Credits = 285, User = new User { IdUser = 1, Name = "Yazmin Alejandra", LastName = "Luna Herrera", Gender = Gender.FEMALE, UserStatus = UserStatus.ACTIVE, Email = "*****@*****.**", AlternateEmail = "*****@*****.**", PhoneNumber = "2281564676", Account = new Account { Username = "******", Password = "******", FirstLogin = true } } } }; _mockSet = DbContextMock.GetQueryableMockDbSet(_data, practicioner => practicioner.Enrollment); _mockContext = DbContextMock.GetContext(_mockSet); _unitOfWork = new UnitOfWork(_mockContext); }
public void TestInitialize() { _practicionerValidator = new PracticionerValidator(); _practicioners = new List <Practicioner> { new Practicioner { Enrollment = "zS19012344", Term = "FEBRERO - JULIO 2021", Credits = 285, User = new User { IdUser = 1, Name = "Isamel", LastName = "Luna Ceballos", Gender = Gender.MALE, UserStatus = UserStatus.ACTIVE, Email = "*****@*****.**", AlternateEmail = "*****@*****.**", PhoneNumber = "2289123456", Account = new Account { Username = "******", Password = "******", FirstLogin = true } } } }; _mockSet = DbContextMock.GetQueryableMockDbSet(_practicioners, p => p.Enrollment); _mockContext = DbContextMock.GetContext(_mockSet); _unitOfWork = DbContextMock.GetUnitOfWork(_mockContext); }
public void ValidGetPracticionerMonthlyReports() { List <ActivityPracticioner> monthlyReport = new List <ActivityPracticioner> { new ActivityPracticioner { IdActivityPracticioner = 1, Qualification = 10, Observation = "Muy buen reporte", ActivityPracticionerStatus = ActivityPracticionerStatus.QUALIFIED, Enrollment = "zS18012124", Activity = new Activity { IdActivity = 1, Name = "Primer Reporte Mensual ", ActivityType = ActivityType.MonthlyReport, ActivityStatus = ActivityStatus.ACTIVE, Description = "En esta actividad deberán subir su reporte mensual", ValueActivity = 10, StaffNumberTeacher = "12345" } } }; DbSet <ActivityPracticioner> _mockSet = DbContextMock.GetQueryableMockDbSet(monthlyReport, a => a.IdActivityPracticioner); ProfessionalPracticesContext _mockContext = DbContextMock.GetContext(_mockSet); UnitOfWork unitOfWork = new UnitOfWork(_mockContext); IEnumerable <ActivityPracticioner> report = unitOfWork.ActivityPracticioners.Find(ActivityPracticioner => ActivityPracticioner.Enrollment == "zS18012124" && ActivityPracticioner.Activity.ActivityType == ActivityType.MonthlyReport); Assert.IsNotNull(report); }
public void TestInitialize() { _projectData = new List <Project> { new Project { IdProject = 1, NameProject = "Desarrollo de inventario", Description = "Se debe desarrollar un inventario para una red inmobiliaria", ObjectiveGeneral = "El objetivo general", ObjectiveImmediate = "El objetivo inmediato", ObjectiveMediate = "El objetivo mediato", Methodology = "SCRUM", Resources = "Recursos", Status = ProjectStatus.ACTIVE, Duration = 480, Activities = "Actividades", Responsibilities = "Responsabilidades", QuantityPracticing = 2, IdLinkedOrganization = 1, StaffNumberCoordinator = "ABC123", IdResponsibleProject = 1 }, new Project { IdProject = 2, NameProject = "Sistema bibliotecario", Description = "Se debe desarrollar un sistema bibliotecario", ObjectiveGeneral = "El objetivo general", ObjectiveImmediate = "El objetivo inmediato", ObjectiveMediate = "El objetivo mediato", Methodology = "SCRUM", Resources = "Recursos", Status = ProjectStatus.ACTIVE, Duration = 360, Activities = "Actividades", Responsibilities = "Responsabilidades", QuantityPracticing = 1, IdLinkedOrganization = 1, StaffNumberCoordinator = "ABC123", IdResponsibleProject = 1 } }; _assignmentData = new List <Assignment>(); _projectMockSet = DbContextMock.GetQueryableMockDbSet(_projectData, practicioner => practicioner.IdProject); _assignmentMockSet = DbContextMock.GetQueryableMockDbSet(_assignmentData, assignment => assignment.IdAssignment); _projectMockContext = DbContextMock.GetContext(_projectMockSet); _assignmentMockContext = DbContextMock.GetContext(_assignmentMockSet); _projectUnitOfWork = new UnitOfWork(_projectMockContext); _assignmentUnitOfWork = new UnitOfWork(_assignmentMockContext); }
public void GetProjectInformation() { List <Project> projects = new List <Project> { new Project { IdProject = 2, NameProject = "Sistema Integral", } }; DbSet <Project> mockSet = DbContextMock.GetQueryableMockDbSet(projects, x => x.IdProject); ProfessionalPracticesContext mockContext = DbContextMock.GetContext(mockSet); UnitOfWork unitOfWork = new UnitOfWork(mockContext); Project projectWithSameName = unitOfWork.Projects.FindFirstOccurence(Project => Project.NameProject == "Sistema Integral"); Assert.IsNotNull(projectWithSameName); }
public void GetTeacher() { List <Teacher> data = new List <Teacher> { new Teacher { IdUser = 2, StaffNumber = "5518" } }; DbSet <Teacher> _mockSet = DbContextMock.GetQueryableMockDbSet(data, x => x.IdUser); ProfessionalPracticesContext _mockContext = DbContextMock.GetContext(_mockSet); UnitOfWork unitOfWork = new UnitOfWork(_mockContext); Teacher teacher = unitOfWork.Teachers.FindFirstOccurence(Teacher => Teacher.IdUser == 2); Assert.IsNotNull(teacher); }
public void TestInitialize() { _data = new List <ResponsibleProject> { new ResponsibleProject { Name = "Gustavo Antonio", LastName = "Ruiz Zapata", EmailAddress = "*****@*****.**", Charge = "Jefe de departamento de Tecnología Educativa" } }; DbSet <ResponsibleProject> _mockSet = DbContextMock.GetQueryableMockDbSet(_data, x => x.EmailAddress); ProfessionalPracticesContext _mockContext = DbContextMock.GetContext(_mockSet); _unitOfWork = new UnitOfWork(_mockContext); }
public void TestInitialize() { _data = new List <SchedulingActivity> { new SchedulingActivity { IdSchedulingActivity = 4, Month = "Febrero", Activity = "Análisis de requerimientos, recopilación de información, documentación y revisión de procedimientos.Capacitación en el IDE de desarrollo y metodología.", IdProject = 4 } }; DbSet <SchedulingActivity> _mockSet = DbContextMock.GetQueryableMockDbSet(_data, x => x.IdSchedulingActivity); ProfessionalPracticesContext _mockContext = DbContextMock.GetContext(_mockSet); _unitOfWork = new UnitOfWork(_mockContext); }
public void DetermineIfTeacherExists_Exists() { List <Teacher> data = new List <Teacher> { new Teacher { StaffNumber = "1234", IdUser = 1 } }; DbSet <Teacher> mockSet = DbContextMock.GetQueryableMockDbSet(data, x => x.StaffNumber); ProfessionalPracticesContext mockContext = DbContextMock.GetContext(mockSet); UnitOfWork unitOfWork = new UnitOfWork(mockContext); Teacher teacher = unitOfWork.Teachers.FindFirstOccurence(Teacher => Teacher.StaffNumber == "1234"); Assert.IsNotNull(teacher); }
public void DetermineIfAssignmentExists_Exists() { List <Assignment> data = new List <Assignment> { new Assignment { Enrollment = "zS18012149", IdProject = 1, CompletionTerm = "Febrero - Mayo 2021", } }; DbSet <Assignment> mockSet = DbContextMock.GetQueryableMockDbSet(data, x => x.IdAssignment); ProfessionalPracticesContext mockContext = DbContextMock.GetContext(mockSet); UnitOfWork unitOfWork = new UnitOfWork(mockContext); Assignment assignment = unitOfWork.Assignments.FindFirstOccurence(Assignment => Assignment.Enrollment == "zS18012149"); Assert.IsNotNull(assignment); }
public void TestInitialize() { _groupValidator = new GroupValidator(); _group = new List <Group> { new Group { IdGroup = 1, Nrc = "12341", GroupStatus = GroupStatus.ACTIVE, Term = "FEBRERO-JUNIO 2021", StaffNumber = "65245" } }; _mockSetGroup = DbContextMock.GetQueryableMockDbSet(_group, g => g.IdGroup); _mockContext = DbContextMock.GetContext(_mockSetGroup); _unitOfWork = DbContextMock.GetUnitOfWork(_mockContext); }
public void TestInitialize() { _data = new List <Activity> { new Activity { IdGroup = 1, IdActivity = 2, teacher = new Teacher { StaffNumber = "12345" } } }; _mockSet = DbContextMock.GetQueryableMockDbSet(_data, x => x.IdActivity); _mockContext = DbContextMock.GetContext(_mockSet); _unitOfWork = new UnitOfWork(_mockContext); }
public void GetPracticioner() { List <Practicioner> data = new List <Practicioner> { new Practicioner { IdUser = 2, Enrollment = "zS18012149", Term = "FEBREO-JULIO 2021", Credits = 300 } }; DbSet <Practicioner> _mockSet = DbContextMock.GetQueryableMockDbSet(data, x => x.IdUser); ProfessionalPracticesContext _mockContext = DbContextMock.GetContext(_mockSet); UnitOfWork unitOfWork = new UnitOfWork(_mockContext); Practicioner practicioner = unitOfWork.Practicioners.FindFirstOccurence(Practicioner => Practicioner.IdUser == 2); Assert.IsNotNull(practicioner); }
public void TestInitialize() { _data = new List <Assignment> { new Assignment { IdAssignment = 1, StartTerm = "Febrero - Julio 2021", CompletionTerm = "Agosto - Diciembre 2021", DateAssignment = DateTime.Now, Status = AssignmentStatus.Assigned, IdProject = 1, Enrollment = "S18012122", IdOfficeOfAcceptance = 1 } }; _mockSet = DbContextMock.GetQueryableMockDbSet(_data, assignment => assignment.IdAssignment); _mockContext = DbContextMock.GetContext(_mockSet); _unitOfWork = new UnitOfWork(_mockContext); }
public void RegisterResponsibleProject_Exists() { List <ResponsibleProject> responsiblesProject = new List <ResponsibleProject>(); DbSet <ResponsibleProject> mockSet = DbContextMock.GetQueryableMockDbSet(responsiblesProject, r => r.EmailAddress); ProfessionalPracticesContext mockContext = DbContextMock.GetContext(mockSet); UnitOfWork unitOfWork = DbContextMock.GetUnitOfWork(mockContext); ResponsibleProject newResponsibleProject = new ResponsibleProject { Name = "Gustavo Antonio", LastName = "Ruiz Zapata", EmailAddress = "*****@*****.**", Charge = "Jefe de departamento de Tecnología Educativa" }; unitOfWork.ResponsibleProjects.Add(newResponsibleProject); int expected = 1; int actual = responsiblesProject.Count; Assert.AreEqual(expected, actual); }
public void TestInitialize() { _data = new List <User> { new User { IdUser = 1, Name = "Eduardo Aldair", LastName = "Hernández Solís", Gender = Gender.MALE, UserStatus = UserStatus.ACTIVE, Email = "*****@*****.**", AlternateEmail = "*****@*****.**", PhoneNumber = "2298046218" } }; _mockSet = DbContextMock.GetQueryableMockDbSet(_data, x => x.IdUser); _mockContext = DbContextMock.GetContext(_mockSet); _repository = new Repository <User>(_mockContext); _unitOfWork = new UnitOfWork(_mockContext); }
public void TestInitialize() { _monthlyReports = new List <MonthlyReport> { new MonthlyReport { IdMonthlyReport = 2, DeliveryDate = DateTime.Now, PerformedActivities = "Acordar con la organización vinculada las tareas que se realizarán", ResultsObtained = "Documento de calendario de actividades", HoursReported = 20, HoursCumulative = 20, Enrollment = "zS18012124", IdProject = 1 } }; _mockSet = DbContextMock.GetQueryableMockDbSet(_monthlyReports, p => p.IdMonthlyReport); _mockContext = DbContextMock.GetContext(_mockSet); _unitOfWork = DbContextMock.GetUnitOfWork(_mockContext); }
public void GetQuantityRequestPracticioner() { List <RequestProject> requestProject = new List <RequestProject> { new RequestProject { IdRequestProject = 3, RequestDate = DateTime.Now, IdProject = 2, Enrollment = "zS18012123", RequestStatus = RequestStatus.REQUESTED } }; DbSet <RequestProject> mockSet = DbContextMock.GetQueryableMockDbSet(requestProject, x => x.IdRequestProject); ProfessionalPracticesContext mockContext = DbContextMock.GetContext(mockSet); UnitOfWork unitOfWork = new UnitOfWork(mockContext); RequestProject requestProjectsFound = unitOfWork.RequestProjects.FindFirstOccurence(Request => Request.Enrollment == "zS18012123"); Assert.IsNotNull(requestProjectsFound.Enrollment); }
public void RegisterProject_Exists() { List <Project> projects = new List <Project>(); DbSet <Project> mockSet = DbContextMock.GetQueryableMockDbSet(projects, p => p.NameProject); ProfessionalPracticesContext mockContext = DbContextMock.GetContext(mockSet); UnitOfWork unitOfWork = DbContextMock.GetUnitOfWork(mockContext); Project newProject = new Project { NameProject = "Sistema Integral Académico", Description = "Desarrollar un Sistema Web que gestione los procesos académicos que realizan las diferentes áreas dentro de la Universidad Veracruzana dentro de un mismo portal.", ObjectiveGeneral = "Optimizar los procesos de consulta y seguimiento de los académicos.", ObjectiveImmediate = "Revisión, análisis y documentación de requerimientos académicos con las áreas involucradas durante este desarrollo. " + "Revisión y análisis de la arquitectura." + "Desarrollo de prototipo.", ObjectiveMediate = "Modificación de documentación y Modificación de prototipos.", Methodology = "Proceso de desarrollo iterativo y Design Sprint, SCRUM", Resources = "1 Ingeniero de software/programador Web " + "Recursos materiales: " + "Computadoras de escritorio " + "IDE para programación(Visual Studio con C#) " + "Acceso a Internet " + "Documentación de procesos", Activities = "Realizar a cabo la documentación del desarrollo del proyecto de la primera fase del proyecto, mediante el modelado de casos de uso, la descripción de los mismos y modelo de dominio, desarrollar sobre lenguaje C# y servicios dentro de un API, además de trabajar en equipo dentro del departamento.", Responsibilities = "Cumplir con las funciones y actividades que sean asignadas " + "Cumplir en tiempo y forma con las entregas de prototipos y productos " + "Desarrollar en un ambiente colaborativo " + "Trabajar de acuerdo a los estándares establecidos", DaysHours = "A acordar con el estudiante (en horario de oficina)", Duration = 480, Term = "FEBRERO-JULIO 2021", QuantityPracticing = 3, StaffNumberCoordinator = "1515151" }; unitOfWork.Projects.Add(newProject); int expected = 1; int actual = projects.Count; Assert.AreEqual(expected, actual); }
public void TestInitialize() { _data = new List <LinkedOrganization> { new LinkedOrganization { Name = "Dirección de Desarrollo Informático de Apoyo Académico", DirectUsers = "Comunidad Academica", IndirectUsers = "Comunidad universitaria y población en general", Email = "*****@*****.**", IdCity = 1, IdSector = 1, IdState = 1, Address = "Circuito Aguirre Beltrán S/N", LinkedOrganizationStatus = LinkedOrganizationStatus.ACTIVE } }; DbSet <LinkedOrganization> _mockSet = DbContextMock.GetQueryableMockDbSet(_data, x => x.Email); ProfessionalPracticesContext _mockContext = DbContextMock.GetContext(_mockSet); _unitOfWork = new UnitOfWork(_mockContext); }