| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 | 
							- using System;
 
- using Microsoft.VisualStudio.TestTools.UnitTesting;
 
- using iBemsDataService.Controllers;
 
- using System.Net.Http;
 
- using System.Web.Http;
 
- using System.Web.Http.Routing;
 
- using System.Diagnostics;
 
- namespace iBemsDataService.Tests
 
- {
 
-     [TestClass]
 
-     public class TestMonitoringPointController
 
-     {
 
-         [TestMethod]
 
-         public void TestGetMonitoringPoint()
 
-         {
 
-             try
 
-             {
 
-                 var controller = new MonitoringPointController();
 
-                 controller.Request = new HttpRequestMessage
 
-                 {
 
-                     RequestUri = new Uri( "http://localhost:3403/odata/MonitoringPoint?%24top=20&%24filter=(SiteId+eq+1)+and+((BuildingId+ne+1)+or+(FloorId+ne+1)+or+(ZoneId+ne+0))&%24inlinecount=allpages" ) ,
 
-                 };
 
-                 controller.Configuration = new HttpConfiguration();
 
-                 var list = controller.GetMonitoringPoint();
 
-                 foreach( var v in list )
 
-                 {
 
-                     Trace.WriteLine( string.Format( "{0} {1} - {2}" , 
 
-                         v.FacilityCode, 
 
-                         v.PropertyId ,
 
-                         v.BuildingId ));
 
-                 }
 
-                 Assert.IsTrue( true );
 
-             }
 
-             catch( Exception e )
 
-             {
 
-                 Trace.WriteLine( e.Message );
 
-                 throw e;
 
-             }   
 
-         }
 
-     }
 
- }
 
 
  |