Add a more functional (i.e. fewer-stubs) implementation of System.Data.Linq.
[mono.git] / mcs / nunit24 / NUnitFixtures / fixtures / PlatformInfo.cs
1 // ****************************************************************\r
2 // Copyright 2007, Charlie Poole\r
3 // This is free software licensed under the NUnit license. You may\r
4 // obtain a copy of the license at http://nunit.org/?p=license&r=2.4\r
5 // ****************************************************************\r
6 \r
7 using System;\r
8 \r
9 namespace NUnit.Fixtures\r
10 {\r
11         /// <summary>\r
12         /// PlatformFixture simply displays info about the platform\r
13         /// we are running on.\r
14         /// </summary>\r
15         public class PlatformInfo : fit.Fixture\r
16         {\r
17                 public override void doTable(fit.Parse table)\r
18                 {\r
19                         table.parts.more =\r
20                                 tr( td( "platform", td( Environment.OSVersion.ToString(), null ) ),\r
21                                 tr( td( "clrVersion", td( Environment.Version.ToString(), null ) ),\r
22                                 null ) );\r
23                                 \r
24                 }\r
25 \r
26                 private fit.Parse tr( fit.Parse parts, fit.Parse more) \r
27                 {\r
28                         return new fit.Parse ("tr", null, parts, more);\r
29                 }\r
30 \r
31                 private fit.Parse td(string body, fit.Parse more) \r
32                 {\r
33                         return new fit.Parse ("td", info(body), null, more);\r
34                 }\r
35         }\r
36 }\r