public void GetSitesExceptionStateTest() { SiteService siteservice = new SiteService(new RepositoryMock<Site>(), new RepositoryMock<Measurement>()); siteservice.GetSites(null); }
public void GetSitesTest() { SiteService target = new SiteService(new RepositoryMock<Site>(), new RepositoryMock<Measurement>()); Customer customer = new Customer() { Person = new Person() { Email = "*****@*****.**", Firstname = "PersonVorname", Lastname = "PersonNachname", Password = "******", Username = "******" } }; customer.Sites.Add(new Site() { Description = "Description", Latitude = 43.012312, Longitude = 12.12312, Serialnumber = "!§$%&/()", SiteID = 1 }); customer.Sites.Add(new Site() { Description = "Description", Latitude = 43.012312, Longitude = 12.12312, Serialnumber = "!§$%&/()", SiteID = 2 }); List<Site> expected = new List<Site>(customer.Sites); List<Site> actual; actual = target.GetSites(customer); Assert.AreEqual(expected[0], actual[0]); Assert.AreEqual(expected[1], actual[1]); }
public void GetSitesExceptionStateTest() { SiteService siteservice = new SiteService(); siteservice.GetSites(null); }