root/UnityWeb/UnityWeb/Repository/Test/NHibernateRepositoryTest/EmployeeDataProviderTest.cs
| 55 | 56 | ||
|---|---|---|---|
1 | #region Using Statements | 1 | #region Using Statements |
2 | 2 | ||
3 | using System.Collections.Generic; | ||
4 | using Domain.Business; | 3 | using Domain.Business; |
5 | using Domain.Business.Active; | ||
6 | using Microsoft.Practices.Unity; | 4 | using Microsoft.Practices.Unity; |
7 | using Microsoft.VisualStudio.TestTools.UnitTesting; | 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; |
8 | using Repository.NHibernateDataAccess; | 6 | using Repository.NHibernateDataAccess; |
... | ... | ||
83 | [TestMethod] | 81 | [TestMethod] |
84 | public void GetEmployees() | 82 | public void GetEmployees() |
85 | { | 83 | { |
86 | IList<Employee> employees = _provider.GetEmployees(); | 84 | var employees = _provider.GetEmployees(); |
87 | Assert.IsNotNull(employees); | 85 | Assert.IsNotNull(employees); |
88 | Assert.IsTrue(employees.Count > 0); | 86 | Assert.IsTrue(employees.Count > 0); |
89 | Assert.IsTrue(employees[0].Id > 0); | 87 | Assert.IsTrue(employees[0].Id > 0); |
... | ... | ||
94 | public void GetEmployee() | 92 | public void GetEmployee() |
95 | { | 93 | { |
96 | const int id = 9; | 94 | const int id = 9; |
97 | Employee employee = _provider.GetEmployee(id); | 95 | var employee = _provider.GetEmployee(id); |
98 | 96 | ||
99 | Assert.IsNotNull(employee); | 97 | Assert.IsNotNull(employee); |
100 | //Assert.IsTrue(employee.Id.HasValue); | 98 | //Assert.IsTrue(employee.Id.HasValue); |
... | ... | ||
124 | [TestMethod] | 122 | [TestMethod] |
125 | public void GetTerritories() | 123 | public void GetTerritories() |
126 | { | 124 | { |
127 | IList<Territory> territories = _provider.GetTerritories(); | 125 | var territories = _provider.GetTerritories(); |
128 | 126 | ||
129 | Assert.IsTrue(territories.Count > 0); | 127 | Assert.IsTrue(territories.Count > 0); |
130 | Assert.IsFalse(string.IsNullOrEmpty(territories[0].Id)); | 128 | Assert.IsFalse(string.IsNullOrEmpty(territories[0].Id)); |
Download diff