/[OhmsLawCalc]/trunk/libOhmsLawCalc/OhmsLawAPITest.cs
ViewVC logotype

Contents of /trunk/libOhmsLawCalc/OhmsLawAPITest.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13 - (show annotations) (download)
Wed Jan 29 04:16:58 2014 UTC (6 years ago) by william
File size: 1157 byte(s)

1 using Enterprise.Logging;
2 using System;
3 using System.Collections.Generic;
4 using System.Diagnostics;
5 using System.Linq;
6 using System.Text;
7
8 namespace libOhmsLawCalc
9 {
10 public class OhmsLawAPITest
11 {
12 [Conditional("ENABLE_API_TESTING")]
13 public void TestAPI()
14 {
15 gLog.Warn.WriteLine("Starting Ohm's Law API Test");
16 try
17 {
18 // API testing code here
19 //UnitConverter c = new UnitConverter(OhmsLawValueType.Power, 1.0f, OhmsLawUnitType.Default);
20 OhmsLawValue olv = new OhmsLawValue(OhmsLawValueType.Power, OhmsLawUnitType.Milli, 500f);
21 string str_olv = olv.ToString();
22 }
23 catch (Exception ex)
24 {
25 gLog.Error.WriteLine("Failed to compelte Ohm's Law API Test");
26 gLog.Error.WriteLine(ex.ToString());
27 if (Debugger.IsAttached) { throw ex; }
28 else
29 {
30 return;
31 }
32 }
33 gLog.Warn.WriteLine("Completed Ohm's Law API Test");
34 }
35 }
36 }

  ViewVC Help
Powered by ViewVC 1.1.22