public void GetSecondMailAliasEMails_ForSDDDAEmployeesWithCurrentUser_SecondMails() { //Arrange var vc = new ViewContext(); vc.HttpContext = new FakeHttpContext(); HtmlHelper helper = new HtmlHelper(vc, new FakeViewDataContainer()); var mock = Mock_Repository.CreateMock(); controllerContext = new Mock <ControllerContext>(); messengerMock = new Mock <IMessenger>(); messengerMock.Setup(m => m.Notify(It.IsAny <IMessage>())).Verifiable(); controllerContext.SetupGet(p => p.HttpContext.User.Identity.Name).Returns("rkni"); controllerContext.SetupGet(p => p.HttpContext.Request.IsAuthenticated).Returns(true); List <Employee> emps = new List <Employee>(); emps.AddRange(mock.Object.Employees.Where(e => e.DepartmentID == 1).ToList()); //Act var result = helper.GetSecondMailAliasEMailsHelper(emps, "rkni"); //Assert Assert.AreEqual("mailto:[email protected][email protected], abc, [email protected], [email protected], [email protected]", result.ToString()); }
public void SetUp() { mock = Mock_Repository.CreateMock(); employeeViewModel = new EmployeeViewModel(new Employee { EID = "andl" }); }
public void SetupMock() { mock = Mock_Repository.CreateMock(); messengerMock = new Mock <IMessenger>(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.BTMCancelsPermitToADM))).Verifiable(); HttpContext.Current = new HttpContext(new HttpRequest("", "http://localhost:50616", ""), new HttpResponse(new StringWriter())); var routeCollection = new RouteCollection(); if (RouteTable.Routes.Count == 0) { routeCollection.MapRoute("Default", "Home/Index"); System.Web.Routing.RouteTable.Routes.MapRoute("Default", "Home/Index"); } var fakeHttpContext = new Mock <HttpContextBase>(); var fakeIdentity = new GenericIdentity("andl"); var principal = new GenericPrincipal(fakeIdentity, null); fakeHttpContext.Setup(t => t.User).Returns(principal); fakeHttpContext.Setup(t => t.User.Identity.Name).Returns("andl"); controllerContext = new Mock <ControllerContext>(); controllerContext.Setup(t => t.HttpContext).Returns(fakeHttpContext.Object); controllerContext.Setup(t => t.HttpContext.User.Identity.Name).Returns("andl"); }
public void SetUp() { mock = Mock_Repository.CreateMock(); mock1 = Mock_Repository.CreateMock(); dates = new List <DateTime>(); }
public void SetUp() { mock = Mock_Repository.CreateMock(); mock.Setup(m => m.DeleteQuestionSet(0)).Returns <int>(null); mock.Setup(m => m.DeleteQuestionSet(1)).Returns <int>((int questionSetId) => { return(mock.Object.QuestionSets.FirstOrDefault()); }); mock.Setup(m => m.DeleteQuestionSet(2)).Returns <int>(null); messengerMock = new Mock <IMessenger>(); controller = new HRController(mock.Object, messengerMock.Object); }
public void SetUpVU() { mock = Mock_Repository.CreateMock(); Mock <HttpContextBase> context = new Mock <HttpContextBase>(); Mock <HttpRequestBase> request = new Mock <HttpRequestBase>(); request.Setup(r => r.UrlReferrer).Returns(new Uri("http://localhost/Home/VUView")); context.Setup(c => c.Request).Returns(request.Object); controller = new CalendarController(mock.Object); controller.ControllerContext = new ControllerContext(context.Object, new RouteData(), controller); }
public void SetUp() { var mock1 = Mock_Repository.CreateMock(); mock = new Mock <ControllerContext>(); mock.SetupGet(p => p.HttpContext.User.Identity.Name).Returns("briv"); mock.SetupGet(p => p.HttpContext.Request.IsAuthenticated).Returns(true); controller = new AccountController(mock1.Object); controller.ControllerContext = mock.Object; viewContext = new ViewContext(); viewContext.HttpContext = new FakeHttpContext(); }
public JourneyController SetUpABM() { JourneyController controller; mock = Mock_Repository.CreateMock(); Mock <HttpContextBase> context = new Mock <HttpContextBase>(); Mock <HttpRequestBase> request = new Mock <HttpRequestBase>(); request.Setup(r => r.UrlReferrer).Returns(new Uri("http://localhost/Home/ABMView")); context.Setup(c => c.Request).Returns(request.Object); controller = new JourneyController(mock.Object); controller.ControllerContext = new ControllerContext(context.Object, new RouteData(), controller); return(controller); }
public void SetUp() { var mock1 = Mock_Repository.CreateMock(); mock = new Mock <ControllerContext>(); messengerMock = new Mock <IMessenger>(); messengerMock.Setup(m => m.Notify(It.IsAny <IMessage>())).Verifiable(); mock.SetupGet(p => p.HttpContext.User.Identity.Name).Returns("briv"); mock.SetupGet(p => p.HttpContext.Request.IsAuthenticated).Returns(true); controller = new AccountController(mock1.Object, messengerMock.Object); controller.ControllerContext = mock.Object; var routes = new RouteCollection(); controller.Url = new UrlHelper(new RequestContext(mock.Object.HttpContext, new RouteData()), routes); viewContext = new ViewContext(); viewContext.HttpContext = new FakeHttpContext(); }
public void SetupMock() { mock = Mock_Repository.CreateMock(); messengerMock = new Mock <IMessenger>(); HttpContext.Current = new HttpContext(new HttpRequest("", "http://localhost:50616", ""), new HttpResponse(new StringWriter())); var routeCollection = new RouteCollection(); if (RouteTable.Routes.Count == 0) { routeCollection.MapRoute("Default", "Home/Index"); System.Web.Routing.RouteTable.Routes.MapRoute("Default", "Home/Index"); } var fakeHttpContext = new Mock <HttpContextBase>(); var fakeIdentity = new GenericIdentity("User"); var principal = new GenericPrincipal(fakeIdentity, null); fakeHttpContext.Setup(t => t.User).Returns(principal); controllerContext = new Mock <ControllerContext>(); controllerContext.Setup(t => t.HttpContext).Returns(fakeHttpContext.Object); }
public void SetUp() { mock = Mock_Repository.CreateMock(); HttpContext.Current = new HttpContext(new HttpRequest("", "http://localhost:50616", ""), new HttpResponse(new StringWriter())); var routeCollection = new RouteCollection(); if (RouteTable.Routes.Count == 0) { routeCollection.MapRoute("Default", "Home/Index"); System.Web.Routing.RouteTable.Routes.MapRoute("Default", "Home/Index"); } var fakeHttpContext = new Mock <HttpContextBase>(); var fakeIdentity = new GenericIdentity("User"); var principal = new GenericPrincipal(fakeIdentity, null); fakeHttpContext.Setup(t => t.User).Returns(principal); controllerContext = new Mock <ControllerContext>(); controllerContext.Setup(t => t.HttpContext).Returns(fakeHttpContext.Object); messageController = new MessageController(mock.Object); messageController.ControllerContext = controllerContext.Object; List <IMessage> messages = new List <IMessage> { new Message(MessageType.ADMConfirmsPlannedOrRegisteredToBTM, mock.Object.BusinessTrips.Where(bt => bt.BusinessTripID >= 1 && bt.BusinessTripID <= 2).ToList(), mock.Object.Employees.FirstOrDefault()), new Message(MessageType.ADMConfirmsPlannedOrRegisteredToBTM, mock.Object.BusinessTrips.Where(bt => bt.BusinessTripID >= 1 && bt.BusinessTripID <= 2).ToList(), mock.Object.Employees.FirstOrDefault()), new Message(MessageType.ADMConfirmsPlannedOrRegisteredToBTM, mock.Object.BusinessTrips.Where(bt => bt.BusinessTripID >= 1 && bt.BusinessTripID <= 2).ToList(), mock.Object.Employees.FirstOrDefault()), new Message(MessageType.ADMConfirmsPlannedOrRegisteredToBTM, mock.Object.BusinessTrips.Where(bt => bt.BusinessTripID >= 1 && bt.BusinessTripID <= 2).ToList(), mock.Object.Employees.FirstOrDefault()), new Message(MessageType.ADMConfirmsPlannedOrRegisteredToBTM, mock.Object.BusinessTrips.Where(bt => bt.BusinessTripID >= 1 && bt.BusinessTripID <= 2).ToList(), mock.Object.Employees.FirstOrDefault()), new Message(MessageType.ADMConfirmsPlannedOrRegisteredToBTM, mock.Object.BusinessTrips.Where(bt => bt.BusinessTripID >= 1 && bt.BusinessTripID <= 2).ToList(), mock.Object.Employees.FirstOrDefault()), new Message(MessageType.ADMConfirmsPlannedOrRegisteredToBTM, mock.Object.BusinessTrips.Where(bt => bt.BusinessTripID >= 1 && bt.BusinessTripID <= 2).ToList(), mock.Object.Employees.FirstOrDefault()), new Message(MessageType.ACCModifiesConfirmedReportedToDIR, mock.Object.BusinessTrips.Where(bt => bt.BusinessTripID >= 1 && bt.BusinessTripID <= 2).ToList(), mock.Object.Employees.FirstOrDefault()) }; mock.Setup(m => m.Messages).Returns(messages.AsQueryable()); }
public void GetMailAliasEMails_ForOneEmployeeInDeptCurrentUser() { //Arrange var vc = new ViewContext(); vc.HttpContext = new FakeHttpContext(); HtmlHelper helper = new HtmlHelper(vc, new FakeViewDataContainer()); var mock = Mock_Repository.CreateMock(); controllerContext = new Mock <ControllerContext>(); messengerMock = new Mock <IMessenger>(); messengerMock.Setup(m => m.Notify(It.IsAny <IMessage>())).Verifiable(); controllerContext.SetupGet(p => p.HttpContext.User.Identity.Name).Returns("rkni"); controllerContext.SetupGet(p => p.HttpContext.Request.IsAuthenticated).Returns(true); List <Employee> emps = new List <Employee>(); //Act var result = helper.GetMailAliasEMailsHelper(emps, "rkni"); //Assert Assert.AreEqual("mailto:[email protected]?bcc=", result.ToString()); }
public void SetUp() { mock = Mock_Repository.CreateMock(); //List<Department> departments = new List<Department>{ // new Department{DepartmentID = 1, DepartmentName = "SDDDA",Employees = new List<Employee>()}, // new Department{DepartmentID = 2, DepartmentName = "TAAAA",Employees = new List<Employee>()}, // new Department{DepartmentID = 3, DepartmentName = "RAAA1",Employees = new List<Employee>()}, // new Department{DepartmentID = 4, DepartmentName = "RAAA2",Employees = new List<Employee>()}, // new Department{DepartmentID = 5, DepartmentName = "RAAA3",Employees = new List<Employee>()}, // new Department{DepartmentID = 6, DepartmentName = "RAAA4",Employees = new List<Employee>()}, // new Department{DepartmentID = 7, DepartmentName = "RAAA5",Employees = new List<Employee>()}}; //List<Employee> employees = new List<Employee> // { // new Employee {EmployeeID = 1, FirstName = "Anastasia", LastName = "Zarose", DepartmentID = 1, EID = "andl", DateDismissed = new DateTime(2013,11,01), DateEmployed = new DateTime(2011,11,01), IsManager = false, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 2, FirstName = "Anatoliy", LastName = "Struz", DepartmentID = 2, EID = "ascr", DateEmployed = new DateTime(2013,04,11), IsManager = true, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 3, FirstName = "Tymur", LastName = "Pyorge", DepartmentID = 1, EID = "tedk", DateEmployed = new DateTime(2013,04,11), IsManager = false, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 4, FirstName = "Tanya", LastName = "Kowood", DepartmentID = 4 , EID = "tadk", DateEmployed = new DateTime(2012,04,11), IsManager = false, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 5, FirstName = "Ivan", LastName = "Daolson", DepartmentID = 6, EID = "daol", DateEmployed = new DateTime(2013,07,21), IsManager = false, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 6, FirstName = "Boryslav", LastName = "Teshaw", DepartmentID = 5, EID = "tebl", DateEmployed = new DateTime(2011,04,11), IsManager = false, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 7, FirstName = "Tanya", LastName = "Manowens", DepartmentID = 5, EID = "xtwe", DateEmployed = new DateTime(2012,09,04), IsManager = false, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 8, FirstName = "Oleksiy", LastName = "Kowwood", DepartmentID = 1, EID = "xomi", DateEmployed = new DateTime(11/02/2011), IsManager = true, BusinessTrips = new List<BusinessTrip>() } // }; //List<BusinessTrip> businessTrips = new List<BusinessTrip> //{ // new BusinessTrip { BusinessTripID = 1, StartDate = new DateTime(2013, 12, 01), EndDate = new DateTime(2013, 12, 10), OrderStartDate= new DateTime(2013, 11, 30), OrderEndDate= new DateTime(2013, 12,11), LastCRUDedBy = "ncru", LastCRUDTimestamp = new DateTime(2012, 12, 02), Purpose="", Manager="", Responsible="", Status = BTStatus.Planned, EmployeeID = 1, LocationID = 1 }, // new BusinessTrip { BusinessTripID = 2, StartDate = new DateTime(2013, 12, 01), EndDate = new DateTime(2013, 12, 10), OrderStartDate= new DateTime(2013, 11, 30), OrderEndDate= new DateTime(2013, 12,11), LastCRUDedBy = "ncru", LastCRUDTimestamp = new DateTime(2012, 12, 02), Purpose="", Manager = null, Responsible = null, Status = BTStatus.Planned, EmployeeID = 2, LocationID = 1 }, // new BusinessTrip { BusinessTripID = 3, StartDate = new DateTime(2013, 12, 01), EndDate = new DateTime(2013, 12, 10), OrderStartDate= new DateTime(2013, 11, 30), OrderEndDate= new DateTime(2013, 12,11), LastCRUDedBy = "ncru", LastCRUDTimestamp = new DateTime(2012, 12, 02), Purpose="meeting", Manager = "xopu", Responsible = "xopu", Status = BTStatus.Planned, EmployeeID = 2, LocationID = 1 }, // new BusinessTrip { BusinessTripID = 4, StartDate = new DateTime(2013, 12, 01), EndDate = new DateTime(2013, 12, 10), OrderStartDate= new DateTime(2013, 11, 30), OrderEndDate= new DateTime(2013, 12,11), LastCRUDedBy = "ncru", LastCRUDTimestamp = new DateTime(2012, 12, 02), Purpose="", Manager="", Responsible="", RejectComment="", Status = BTStatus.Modified, EmployeeID = 1, LocationID = 1 }, // new BusinessTrip { BusinessTripID = 5, StartDate = new DateTime(2013, 12, 01), EndDate = new DateTime(2013, 12, 10), OrderStartDate= new DateTime(2013, 11, 30), OrderEndDate= new DateTime(2013, 12,11), LastCRUDedBy = "ncru", LastCRUDTimestamp = new DateTime(2012, 12, 02), Purpose="", Manager = null, Responsible = null, RejectComment="Visa Expired", Status = BTStatus.Modified | BTStatus.Cancelled, EmployeeID = 2, LocationID = 1 }, // new BusinessTrip { BusinessTripID = 6, StartDate = new DateTime(2013, 12, 01), EndDate = new DateTime(2013, 12, 10), OrderStartDate= new DateTime(2013, 11, 30), OrderEndDate= new DateTime(2013, 12,11), LastCRUDedBy = "ncru", LastCRUDTimestamp = new DateTime(2012, 12, 02), Purpose="", Manager="", Responsible="", RejectComment="Visa Expired", Status = BTStatus.Modified, EmployeeID = 1, LocationID = 1 }, // new BusinessTrip { BusinessTripID = 7, StartDate = new DateTime(2013, 12, 01), EndDate = new DateTime(2013, 12, 10), OrderStartDate= new DateTime(2013, 11, 30), OrderEndDate= new DateTime(2013, 12,11), LastCRUDedBy = "ncru", LastCRUDTimestamp = new DateTime(2012, 12, 02), Purpose="", Manager="", Responsible="", RejectComment="", Status = BTStatus.Reported, EmployeeID = 1, LocationID = 1 }, // new BusinessTrip { BusinessTripID = 8, StartDate = new DateTime(2013, 12, 01), EndDate = new DateTime(2013, 12, 10), OrderStartDate= new DateTime(2013, 11, 30), OrderEndDate= new DateTime(2013, 12,11), LastCRUDedBy = "ncru", LastCRUDTimestamp = new DateTime(2012, 12, 02), Purpose="", Manager = null, Responsible = null, RejectComment=null, Status = BTStatus.Registered, EmployeeID = 2, LocationID = 1 }, // new BusinessTrip { BusinessTripID = 9, StartDate = new DateTime(2013, 12, 01), EndDate = new DateTime(2013, 12, 10), OrderStartDate= new DateTime(2013, 11, 30), OrderEndDate= new DateTime(2013, 12,11), LastCRUDedBy = "ncru", LastCRUDTimestamp = new DateTime(2012, 12, 02), Purpose="", Manager="", Responsible="", RejectComment="Visa Expired", Status = BTStatus.Confirmed, EmployeeID = 1, LocationID = 1 }, // new BusinessTrip { BusinessTripID = 10, StartDate = new DateTime(2013, 12, 01), EndDate = new DateTime(2013, 12, 10), OrderStartDate= new DateTime(2013, 11, 30), OrderEndDate= new DateTime(2013, 12,11), LastCRUDedBy = "ncru", LastCRUDTimestamp = new DateTime(2012, 12, 02), Purpose="", Manager="", Responsible="", RejectComment="Visa Expired", Status = BTStatus.Cancelled, EmployeeID = 1, LocationID = 1 }, //}; //List<Location> locations = new List<Location> // { // new Location {LocationID = 1, Title = "LDF", Address = "Kyiv, Shevchenka St.", BusinessTrips = new List<BusinessTrip>()}, // new Location {LocationID = 2, Title = "LDL", Address = "Kyiv, Gorodotska St.", BusinessTrips = new List<BusinessTrip>()} // }; //mock.Setup(m => m.Departments).Returns(departments.AsQueryable()); //mock.Setup(m => m.Employees).Returns(employees.AsQueryable()); //mock.Setup(m => m.Locations).Returns(locations.AsQueryable()); //mock.Setup(m => m.BusinessTrips).Returns(businessTrips.AsQueryable()); //departments.Find(d => d.DepartmentID == 1).Employees.Add(employees.Find(e => e.EmployeeID == 1)); //departments.Find(d => d.DepartmentID == 2).Employees.Add(employees.Find(e => e.EmployeeID == 2)); //departments.Find(d => d.DepartmentID == 1).Employees.Add(employees.Find(e => e.EmployeeID == 3)); //departments.Find(d => d.DepartmentID == 4).Employees.Add(employees.Find(e => e.EmployeeID == 4)); //departments.Find(d => d.DepartmentID == 6).Employees.Add(employees.Find(e => e.EmployeeID == 5)); //departments.Find(d => d.DepartmentID == 5).Employees.Add(employees.Find(e => e.EmployeeID == 6)); //departments.Find(d => d.DepartmentID == 5).Employees.Add(employees.Find(e => e.EmployeeID == 7)); //departments.Find(d => d.DepartmentID == 1).Employees.Add(employees.Find(e => e.EmployeeID == 8)); //employees.Find(e => e.EmployeeID == 1).Department = departments.Find(v => v.DepartmentID == 1); //employees.Find(e => e.EmployeeID == 2).Department = departments.Find(v => v.DepartmentID == 2); //employees.Find(e => e.EmployeeID == 3).Department = departments.Find(v => v.DepartmentID == 1); //employees.Find(e => e.EmployeeID == 4).Department = departments.Find(v => v.DepartmentID == 4); //employees.Find(e => e.EmployeeID == 5).Department = departments.Find(v => v.DepartmentID == 6); //employees.Find(e => e.EmployeeID == 6).Department = departments.Find(v => v.DepartmentID == 5); //employees.Find(e => e.EmployeeID == 7).Department = departments.Find(v => v.DepartmentID == 5); //employees.Find(e => e.EmployeeID == 8).Department = departments.Find(v => v.DepartmentID == 1); //employees.Find(e => e.EmployeeID == 1).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 1)); //employees.Find(e => e.EmployeeID == 2).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 2)); //employees.Find(e => e.EmployeeID == 3).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 3)); //employees.Find(e => e.EmployeeID == 3).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 4)); //employees.Find(e => e.EmployeeID == 4).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 5)); //employees.Find(e => e.EmployeeID == 4).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 6)); //employees.Find(e => e.EmployeeID == 4).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 7)); //employees.Find(e => e.EmployeeID == 4).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 8)); //employees.Find(e => e.EmployeeID == 5).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 9)); //employees.Find(e => e.EmployeeID == 6).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 10)); //employees.Find(e => e.EmployeeID == 7).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 11)); //employees.Find(e => e.EmployeeID == 7).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 12)); //employees.Find(e => e.EmployeeID == 7).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 13)); //employees.Find(e => e.EmployeeID == 7).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 14)); //employees.Find(e => e.EmployeeID == 7).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 15)); //employees.Find(e => e.EmployeeID == 7).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 16)); //employees.Find(e => e.EmployeeID == 7).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 17)); //employees.Find(e => e.EmployeeID == 4).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 18)); //employees.Find(e => e.EmployeeID == 4).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 19)); //employees.Find(e => e.EmployeeID == 2).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 20)); //employees.Find(e => e.EmployeeID == 7).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 21)); //employees.Find(e => e.EmployeeID == 5).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 22)); //employees.Find(e => e.EmployeeID == 5).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 23)); //employees.Find(e => e.EmployeeID == 5).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 24)); //employees.Find(e => e.EmployeeID == 8).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 25)); //employees.Find(e => e.EmployeeID == 8).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 26)); //employees.Find(e => e.EmployeeID == 3).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 27)); //employees.Find(e => e.EmployeeID == 3).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 28)); //employees.Find(e => e.EmployeeID == 3).BusinessTrips.Add(businessTrips.Find(v => v.BusinessTripID == 29)); }
public void SetUp() { mock = Mock_Repository.CreateMock(); controller = new PassportController(mock.Object); }
public void Setup() { mock = Mock_Repository.CreateMock(); //List<Department> departments = new List<Department>{ // new Department{DepartmentID = 1, DepartmentName = "SDDDA",Employees = new List<Employee>()}, // new Department{DepartmentID = 2, DepartmentName = "TAAAA",Employees = new List<Employee>()}, // new Department{DepartmentID = 3, DepartmentName = "RAAA1",Employees = new List<Employee>()}, // new Department{DepartmentID = 4, DepartmentName = "RAAA2",Employees = new List<Employee>()}, // new Department{DepartmentID = 5, DepartmentName = "RAAA3",Employees = new List<Employee>()}, // new Department{DepartmentID = 6, DepartmentName = "RAAA4",Employees = new List<Employee>()}, // new Department{DepartmentID = 7, DepartmentName = "RAAA5",Employees = new List<Employee>()}}; //List<Employee> employees = new List<Employee> // { // new Employee {EmployeeID = 1, FirstName = "Anastasia", LastName = "Zarose", DepartmentID = 1, EID = "andl", PositionID = 2, DateDismissed = new DateTime(2013,11,01), DateEmployed = new DateTime(2011,11,01), IsManager = false, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 2, FirstName = "Anatoliy", LastName = "Struz", DepartmentID = 2, EID = "ascr", PositionID = 2, DateEmployed = new DateTime(2013,04,11), IsManager = true, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 3, FirstName = "Tymur", LastName = "Pyorge", DepartmentID = 1, EID = "tedk", PositionID = 2, DateEmployed = new DateTime(2013,04,11), IsManager = false, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 4, FirstName = "Tanya", LastName = "Kowood", DepartmentID = 4 , EID = "tadk", PositionID = 2, DateEmployed = new DateTime(2012,04,11), IsManager = false, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 5, FirstName = "Ivan", LastName = "Daolson", DepartmentID = 6, EID = "daol", PositionID = 2, DateEmployed = new DateTime(2013,07,21), IsManager = false, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 6, FirstName = "Boryslav", LastName = "Teshaw", DepartmentID = 5, EID = "tebl", PositionID = 2, DateEmployed = new DateTime(2011,04,11), IsManager = false, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 7, FirstName = "Tanya", LastName = "Manowens", DepartmentID = 5, EID = "xtwe", PositionID = 4, DateEmployed = new DateTime(2012,09,04), IsManager = false, BusinessTrips = new List<BusinessTrip>()}, // new Employee {EmployeeID = 8, FirstName = "Oleksiy", LastName = "Kowwood", DepartmentID = 1, EID = "xomi",PositionID = 3, DateEmployed = new DateTime(11/02/2011), IsManager = true } // }; //List<Position> positions = new List<Position> // { // new Position {PositionID = 1, TitleEn = "Employee", TitleUk = "Працівник" , Employees = new List<Employee>()}, // new Position {PositionID = 2, TitleEn = "Software developer", TitleUk = "Розробник програмного забезпечення", Employees = new List<Employee>()}, // new Position {PositionID = 3, TitleEn = "Director", TitleUk = "Директор", Employees = new List<Employee>() }, // new Position {PositionID = 4, TitleEn = "Manager", TitleUk = "Лайн-менеджер", Employees = new List<Employee>() }, // }; //mock.Setup(m => m.Positions).Returns(positions.AsQueryable()); //mock.Setup(m => m.Employees).Returns(employees.AsQueryable()); //mock.Setup(m => m.Departments).Returns(departments.AsQueryable()); //employees.Find(b => b.EmployeeID == 1).Position = (positions.Find(l => l.PositionID == 2)); //employees.Find(b => b.EmployeeID == 2).Position = (positions.Find(l => l.PositionID == 2)); //employees.Find(b => b.EmployeeID == 3).Position = (positions.Find(l => l.PositionID == 2)); //employees.Find(b => b.EmployeeID == 4).Position = (positions.Find(l => l.PositionID == 2)); //employees.Find(b => b.EmployeeID == 5).Position = (positions.Find(l => l.PositionID == 2)); //employees.Find(b => b.EmployeeID == 6).Position = (positions.Find(l => l.PositionID == 2)); //employees.Find(b => b.EmployeeID == 7).Position = (positions.Find(l => l.PositionID == 4)); //employees.Find(b => b.EmployeeID == 8).Position = (positions.Find(l => l.PositionID == 3)); //positions.Find(l => l.PositionID == 2).Employees.Add(employees.Find(e=> e.EmployeeID == 1)); //positions.Find(l => l.PositionID == 2).Employees.Add(employees.Find(e=> e.EmployeeID == 2)); //positions.Find(l => l.PositionID == 2).Employees.Add(employees.Find(e=> e.EmployeeID == 3)); //positions.Find(l => l.PositionID == 2).Employees.Add(employees.Find(e=> e.EmployeeID == 4)); //positions.Find(l => l.PositionID == 2).Employees.Add(employees.Find(e=> e.EmployeeID == 5)); //positions.Find(l => l.PositionID == 2).Employees.Add(employees.Find(e=> e.EmployeeID == 6)); //positions.Find(l => l.PositionID == 4).Employees.Add(employees.Find(e=> e.EmployeeID == 7)); //positions.Find(l => l.PositionID == 3).Employees.Add(employees.Find(e=> e.EmployeeID == 8)); //departments.Find(d => d.DepartmentID == 1).Employees.Add(employees.Find(e => e.EmployeeID == 1)); //departments.Find(d => d.DepartmentID == 2).Employees.Add(employees.Find(e => e.EmployeeID == 2)); //departments.Find(d => d.DepartmentID == 1).Employees.Add(employees.Find(e => e.EmployeeID == 3)); //departments.Find(d => d.DepartmentID == 4).Employees.Add(employees.Find(e => e.EmployeeID == 4)); //departments.Find(d => d.DepartmentID == 1).Employees.Add(employees.Find(e => e.EmployeeID == 5)); //departments.Find(d => d.DepartmentID == 3).Employees.Add(employees.Find(e => e.EmployeeID == 6)); //departments.Find(d => d.DepartmentID == 3).Employees.Add(employees.Find(e => e.EmployeeID == 7)); //departments.Find(d => d.DepartmentID == 1).Employees.Add(employees.Find(e => e.EmployeeID == 8)); //employees.Find(e => e.EmployeeID == 1).Department = departments.Find(v => v.DepartmentID == 1); //employees.Find(e => e.EmployeeID == 2).Department = departments.Find(v => v.DepartmentID == 2); //employees.Find(e => e.EmployeeID == 3).Department = departments.Find(v => v.DepartmentID == 1); //employees.Find(e => e.EmployeeID == 4).Department = departments.Find(v => v.DepartmentID == 4); //employees.Find(e => e.EmployeeID == 5).Department = departments.Find(v => v.DepartmentID == 6); //employees.Find(e => e.EmployeeID == 6).Department = departments.Find(v => v.DepartmentID == 5); //employees.Find(e => e.EmployeeID == 7).Department = departments.Find(v => v.DepartmentID == 5); //employees.Find(e => e.EmployeeID == 8).Department = departments.Find(v => v.DepartmentID == 1); }
public void SetupMock() { mock = Mock_Repository.CreateMock(); }
public void SetUp() { mock = Mock_Repository.CreateMock(); controller = new HolidayController(mock.Object); }
public void SetUp() { mock = Mock_Repository.CreateMock(); messengerMock = new Mock <IMessenger>(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.UnknownType))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ACCCancelsConfirmedReportedToADM))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ACCCancelsConfirmedReportedToBTM))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ACCCancelsConfirmedReportedToEMP))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ACCCancelsConfirmedReportedToResponsible))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ACCModifiesConfirmedReportedToADM))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ACCModifiesConfirmedReportedToBTM))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ACCModifiesConfirmedReportedToDIR))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ACCModifiesConfirmedReportedToEMP))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMCancelsConfirmedOrConfirmedModifiedToBTM))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMCancelsConfirmedOrConfirmedModifiedToDIR))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMCancelsConfirmedOrConfirmedModifiedToEMP))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMCancelsConfirmedOrConfirmedModifiedToACC))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMCancelsConfirmedOrConfirmedModifiedToResponsible))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMCancelsRegisteredOrRegisteredModifiedToBTM))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMCancelsRegisteredOrRegisteredModifiedToEMP))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMCancelsRegisteredOrRegisteredModifiedToACC))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMConfirmsPlannedOrRegisteredToBTM))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMConfirmsPlannedOrRegisteredToDIR))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMConfirmsPlannedOrRegisteredToEMP))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMConfirmsPlannedOrRegisteredToResponsible))).Verifiable(); //messengerMock.Setup(m => m.Notify(It.Is<IMessage>(msg => msg.messageType == MessageType.ADMConfirmsPlannedOrRegisteredToACC))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMRegistersPlannedOrPlannedModifiedToBTM))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMRegistersPlannedOrPlannedModifiedToEMP))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMRegistersPlannedOrPlannedModifiedToACC))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMReplansRegisteredOrRegisteredModifiedToBTM))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMReplansRegisteredOrRegisteredModifiedToACC))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.BTMRejectsConfirmedOrConfirmedModifiedToADM))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.BTMRejectsConfirmedOrConfirmedModifiedToEMP))).Verifiable(); //messengerMock.Setup(m => m.Notify(It.Is<IMessage>(msg => msg.messageType == MessageType.BTMRejectsConfirmedOrConfirmedModifiedToACC))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.BTMRejectsRegisteredOrRegisteredModifiedToADM))).Verifiable(); //messengerMock.Setup(m => m.Notify(It.Is<IMessage>(msg => msg.messageType == MessageType.BTMRejectsRegisteredOrRegisteredModifiedToACC))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.BTMReportsConfirmedOrConfirmedModifiedToACC))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.BTMReportsConfirmedOrConfirmedModifiedToEMP))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.BTMUpdatesConfirmedOrConfirmedModifiedToEMP))).Verifiable(); //messengerMock.Setup(m => m.Notify(It.Is<IMessage>(msg => msg.messageType == MessageType.BTMUpdatesConfirmedOrConfirmedModifiedToACC))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.DIRRejectsConfirmedToADM))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.DIRRejectsConfirmedToEMP))).Verifiable(); //messengerMock.Setup(m => m.Notify(It.Is<IMessage>(msg => msg.messageType == MessageType.DIRRejectsConfirmedToACC))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMCancelsPlannedModifiedToBTM))).Verifiable(); //messengerMock.Setup(m => m.Notify(It.Is<IMessage>(msg => msg.messageType == MessageType.ADMCancelsPlannedModifiedToACC))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMConfirmsPlannedOrRegisteredToResponsible))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ADMCancelsConfirmedOrConfirmedModifiedToResponsible))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ACCCancelsConfirmedReportedToResponsible))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.BTMRejectsConfirmedOrConfirmedModifiedToResponsible))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.DIRRejectsConfirmedToResponsible))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.BTMUpdatesConfirmedOrConfirmedModifiedToResponsible))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.BTMReportsConfirmedOrConfirmedModifiedToResponsible))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.ACCModifiesConfirmedReportedToResponsible))).Verifiable(); HttpContext.Current = new HttpContext(new HttpRequest("", "http://localhost:50616", ""), new HttpResponse(new StringWriter())); var routeCollection = new RouteCollection(); if (RouteTable.Routes.Count == 0) { routeCollection.MapRoute("Default", "Home/Index"); System.Web.Routing.RouteTable.Routes.MapRoute("Default", "Home/Index"); } var fakeHttpContext = new Mock <HttpContextBase>(); var fakeIdentity = new GenericIdentity("User"); var principal = new GenericPrincipal(fakeIdentity, null); fakeHttpContext.Setup(t => t.User).Returns(principal); controllerContext = new Mock <ControllerContext>(); controllerContext.Setup(t => t.HttpContext).Returns(fakeHttpContext.Object); controller = new BusinessTripController(mock.Object, messengerMock.Object); controller.ControllerContext = controllerContext.Object; }
public void SetUp() { mock = Mock_Repository.CreateMock(); controller = new VacationController(mock.Object); }
public void SetUp() { mock = Mock_Repository.CreateMock(); xlsExporterMock = new Mock <IXLSExporter>(); controller = new AbsenceController(mock.Object, xlsExporterMock.Object); }
public void SetUp() { mock = Mock_Repository.CreateMock(); absenceViewModel = new AbsenceViewModel(); }
public void SetUp() { mock = Mock_Repository.CreateMock(); xlsExporter = new XlsExporter(); xlsExporter.workSheet = new Worksheet("test"); }
public void SetUp() { mock = Mock_Repository.CreateMock(); employee = new Employee(); }
public void SetupMock() { mock = Mock_Repository.CreateMock(); messengerMock = new Mock <IMessenger>(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.BTMUpdateVisaRegistrationDateToEMP))).Verifiable(); messengerMock.Setup(m => m.Notify(It.Is <IMessage>(msg => msg.messageType == MessageType.BTMCreateVisaRegistrationDateToEMP))).Verifiable(); HttpContext.Current = new HttpContext(new HttpRequest("", "http://localhost:50616", ""), new HttpResponse(new StringWriter())); var routeCollection = new RouteCollection(); if (RouteTable.Routes.Count == 0) { routeCollection.MapRoute("Default", "Home/Index"); System.Web.Routing.RouteTable.Routes.MapRoute("Default", "Home/Index"); } var fakeHttpContext = new Mock <HttpContextBase>(); var fakeIdentity = new GenericIdentity("andl"); var principal = new GenericPrincipal(fakeIdentity, null); fakeHttpContext.Setup(t => t.User).Returns(principal); fakeHttpContext.Setup(t => t.User.Identity.Name).Returns("andl"); controllerContext = new Mock <ControllerContext>(); controllerContext.Setup(t => t.HttpContext).Returns(fakeHttpContext.Object); controllerContext.Setup(t => t.HttpContext.User.Identity.Name).Returns("andl"); //List<Department> departments = new List<Department>{ // new Department{DepartmentID = 1, DepartmentName = "SDDDA",Employees = new List<Employee>()}, // new Department{DepartmentID = 2, DepartmentName = "TAAAA",Employees = new List<Employee>()}, // new Department{DepartmentID = 3, DepartmentName = "RAAA1",Employees = new List<Employee>()}, // new Department{DepartmentID = 4, DepartmentName = "RAAA2",Employees = new List<Employee>()}, // new Department{DepartmentID = 5, DepartmentName = "RAAA3",Employees = new List<Employee>()}, // new Department{DepartmentID = 6, DepartmentName = "RAAA4",Employees = new List<Employee>()}, // new Department{DepartmentID = 7, DepartmentName = "RAAA5",Employees = new List<Employee>()} //}; //List<Employee> employees = new List<Employee> //{ // new Employee {EmployeeID = 1, FirstName = "Anastasia", LastName = "Zarose", DepartmentID = 1, EID = "andl", DateDismissed = new DateTime(11/01/2013), DateEmployed = new DateTime(11/02/2011), IsManager = false}, // new Employee {EmployeeID = 2, FirstName = "Anatoliy",LastName = "Struz",DepartmentID = 2, EID = "ascr", DateEmployed = new DateTime(11/04/2013), IsManager = true}, // new Employee {EmployeeID = 3, FirstName = "Tymur",LastName = "Pyorge",DepartmentID = 1, EID = "tedk", DateEmployed = new DateTime(11/04/2013), IsManager = false, Department = departments.Find(d => d.DepartmentID == 1)}, // new Employee {EmployeeID = 4, FirstName = "Tanya",LastName = "Kowood",DepartmentID = 4 , EID = "tadk", DateEmployed = new DateTime(11/04/2012), IsManager = false}, // new Employee {EmployeeID = 5, FirstName = "Ivan",LastName = "Daolson",DepartmentID = 6, EID = "daol", DateEmployed = new DateTime(21/07/2013), IsManager = false}, // new Employee {EmployeeID = 6, FirstName = "Boryslav",LastName = "Teshaw",DepartmentID = 5, EID = "tebl", DateEmployed = new DateTime(11/04/2011), IsManager = false}, // new Employee {EmployeeID = 7, FirstName = "Tanya",LastName = "Manowens",DepartmentID = 5, EID = "xtwe", DateEmployed = new DateTime(09/04/2012), IsManager = false} //}; //List<Visa> visas = new List<Visa> //{ // new Visa { EmployeeID = 1, VisaType = "D08", StartDate = new DateTime(2013,8,1), DueDate = new DateTime (2013,2,1 ), Days = 90, DaysUsedInBT = 0, Entries = 0, EntriesUsedInBT = 0, VisaOf = employees.Find(e => e.EmployeeID == 1) }, // new Visa { EmployeeID = 2, VisaType = "C07", StartDate = new DateTime(2012,2,13), DueDate = new DateTime (2013,5,13), Days = 20, DaysUsedInBT = 5, Entries = 2, EntriesUsedInBT = 4, VisaOf = employees.Find(e => e.EmployeeID == 2) } //}; //List<VisaRegistrationDate> visaRegistrationDates = new List<VisaRegistrationDate> //{ // new VisaRegistrationDate {EmployeeID = 1, RegistrationDate = new DateTime(01/01/2013), VisaType="C04", VisaRegistrationDateOf = employees.Find(e => e.EmployeeID == 1)}, // new VisaRegistrationDate {EmployeeID = 2, RegistrationDate = new DateTime(02/10/2013), VisaType="D07", VisaRegistrationDateOf = employees.Find(e => e.EmployeeID == 2)}, // new VisaRegistrationDate {EmployeeID = 3, RegistrationDate = new DateTime(03/01/2013), VisaType="C04", VisaRegistrationDateOf = employees.Find(e => e.EmployeeID == 3)}, // new VisaRegistrationDate {EmployeeID = 4, RegistrationDate = new DateTime(04/01/2013), VisaType="D07", VisaRegistrationDateOf = employees.Find(e => e.EmployeeID == 4)} //}; //mock.Setup(m => m.Employees).Returns(employees.AsQueryable()); //mock.Setup(m => m.Departments).Returns(departments.AsQueryable()); //mock.Setup(m => m.Visas).Returns(visas.AsQueryable()); //mock.Setup(m => m.VisaRegistrationDates).Returns(visaRegistrationDates.AsQueryable()); //employees.Find(e => e.EmployeeID == 1).Department = departments.Find(v => v.DepartmentID == 1); //employees.Find(e => e.EmployeeID == 2).Department = departments.Find(v => v.DepartmentID == 2); //employees.Find(e => e.EmployeeID == 3).Department = departments.Find(v => v.DepartmentID == 1); //employees.Find(e => e.EmployeeID == 4).Department = departments.Find(v => v.DepartmentID == 4); //employees.Find(e => e.EmployeeID == 5).Department = departments.Find(v => v.DepartmentID == 6); //employees.Find(e => e.EmployeeID == 6).Department = departments.Find(v => v.DepartmentID == 5); //employees.Find(e => e.EmployeeID == 7).Department = departments.Find(v => v.DepartmentID == 5); //employees.Find(e => e.EmployeeID == 1).Visa = visas.Find(v => v.EmployeeID == 1); //employees.Find(e => e.EmployeeID == 2).Visa = visas.Find(v => v.EmployeeID == 2); //employees.Find(e => e.EmployeeID == 1).VisaRegistrationDate = visaRegistrationDates.Find(vrd => vrd.EmployeeID == 1); //employees.Find(e => e.EmployeeID == 2).VisaRegistrationDate = visaRegistrationDates.Find(vrd => vrd.EmployeeID == 2); //employees.Find(e => e.EmployeeID == 3).VisaRegistrationDate = visaRegistrationDates.Find(vrd => vrd.EmployeeID == 3); //employees.Find(e => e.EmployeeID == 4).VisaRegistrationDate = visaRegistrationDates.Find(vrd => vrd.EmployeeID == 4); }
public void SetUp() { mock = Mock_Repository.CreateMock(); businessTripViewModel = new BusinessTripViewModel(new BusinessTrip()); }