Ejemplo n.º 1
0
        public async Task ExpenseRepository_GetExpenseAllUserInfo_Call_GetResults_Test()
        {
            var context   = new MyCompanyContext();
            int expenseId = context.Expenses.FirstOrDefault(e => e.Employee.EmployeePictures.Any()).ExpenseId;

            var result = await target.GetAllUserInfoAsync(expenseId, PictureType.Small);

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.Employee);
            Assert.IsNotNull(result.Employee.EmployeePictures);
            Assert.IsTrue(result.Employee.EmployeePictures.Count() == 1);
            Assert.IsTrue(result.ExpenseId == expenseId);
        }