public void ApproverIsCopiedWhenConvertingAnExpenseToAnExpenseEntity() { var expense = new Model.Expense { User = new User(), ApproverName = "Approver" }; var expenseEntity = expense.ToEntity(); Assert.AreEqual("Approver", expenseEntity.Approver); }
public void TitleIsCopiedWhenConvertingAnExpenseToAnExpenseEntity() { var expense = new Model.Expense { Title = "Title", User = new User(), ApproverName = string.Empty }; var expenseEntity = expense.ToEntity(); Assert.AreEqual("Title", expenseEntity.Title); }
public void ApprovedIsCopiedWhenConvertingAnExpenseToAnExpenseEntity() { var expense = new Model.Expense { Approved = true, User = new User(), ApproverName = string.Empty }; var expenseEntity = expense.ToEntity(); Assert.AreEqual(true, expenseEntity.Approved); }
public void DescriptionIsCopiedWhenConvertingAnExpenseToAnExpenseEntity() { var expense = new Model.Expense { Description = "Description", User = new User(), ApproverName = string.Empty }; var expenseEntity = expense.ToEntity(); Assert.AreEqual("Description", expenseEntity.Description); }
public void CostCenterIsCopiedWhenConvertingAnExpenseToAnExpenseEntity() { var expense = new Model.Expense { CostCenter = "Cost Center", User = new User(), ApproverName = string.Empty }; var expenseEntity = expense.ToEntity(); Assert.AreEqual("Cost Center", expenseEntity.CostCenter); }
public void AmountIsCopiedWhenConvertingAnExpenseToAnExpenseEntity() { var expense = new Model.Expense { Total = 100.0, User = new User(), ApproverName = string.Empty }; var expenseEntity = expense.ToEntity(); Assert.AreEqual(100.0, Convert.ToDouble(expenseEntity.Amount)); }
public void ReimbursementMethodIsCopiedWhenConvertingAnExpenseToAnExpenseEntity() { var expense = new Model.Expense { ReimbursementMethod = ReimbursementMethod.Cash, User = new User(), ApproverName = string.Empty }; var expenseEntity = expense.ToEntity(); Assert.AreEqual(Enum.GetName(typeof(ReimbursementMethod), ReimbursementMethod.Cash), expenseEntity.ReimbursementMethod); }
public void DateIsCopiedWhenConvertingAnExpenseToAnExpenseEntity() { var expectedDate = new DateTime(2000, 1, 1); var expense = new Model.Expense { Date = expectedDate, User = new User(), ApproverName = string.Empty }; var expenseEntity = expense.ToEntity(); Assert.AreEqual(expectedDate, expenseEntity.Date); }
public void IdIsCopiedWhenConvertingAnExpenseToAnExpenseEntity() { var expectedId = Guid.NewGuid(); var expense = new Model.Expense { Id = expectedId, User = new User(), ApproverName = string.Empty }; var expenseEntity = expense.ToEntity(); Assert.AreEqual(expectedId, expenseEntity.Id); }
public void UserNameIsCopiedWhenConvertingAnExpenseToAnExpenseEntity() { var expense = new Model.Expense { User = new User { UserName = "******" }, ApproverName = string.Empty }; var expenseEntity = expense.ToEntity(); Assert.AreEqual("User Name", expenseEntity.UserName); }