/// <summary> /// Puts a new employee in the employeeForHire List. /// </summary> public EmployeeData GenerateEmployeeForHire() { EmployeeData newEmployee = new EmployeeData(); newEmployee = factoryObject.GetNewEmployee(); return(newEmployee); }
public void SetUp() { EditorSceneManager.OpenScene("Assets/Scenes/MainGame.unity"); emp = (EmployeeManager)FormatterServices.GetUninitializedObject(typeof(EmployeeManager)); EmployeeList list = ScriptableObject.CreateInstance <EmployeeList>(); factory = Substitute.For <EmployeeFactory>(); testEmployee = new EmployeeData { generatedData = new EmployeeGeneratedData { name = "Test Employee" }, hireableDays = 1 }; factory.GetNewEmployee().Returns(testEmployee); emp.factoryObject = factory; emp.InitDefaultState(); emp.EmployeeForHirePrefab = GameObject.CreatePrimitive(PrimitiveType.Capsule); }