Free cookie consent management tool by TermsFeed Policy Generator

source: branches/ClientManagement/HeuristicLab.Services.Authentication/Test/Program.cs @ 5306

Last change on this file since 5306 was 4958, checked in by jhaider, 14 years ago

added TestWebService #1197

File size: 2.1 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Services.Authentication;
6using DA = HeuristicLab.Services.Authentication.DataAccess;
7using DT = HeuristicLab.Services.Authentication.DataTransfer;
8
9namespace Test
10{
11    class Program
12    {
13        static void Main(string[] args)
14        {
15
16            //DA.ClientManagmentDataContext dc = new DA.ClientManagmentDataContext(@"Data Source=.\SQL2008;Initial Catalog=HeuristicLab.ClientManagment;Integrated Security=True");
17            DA.ClientManagmentDataContext dc = new DA.ClientManagmentDataContext();
18
19            //if (dc.DatabaseExists())
20            //{
21            //    Console.WriteLine("DB exsits");
22            //    dc.DeleteDatabase();
23            //    dc.SubmitChanges();
24            //    Console.WriteLine("DB deleted");
25            //}
26            //Console.WriteLine("DB create");
27            //dc.CreateDatabase();
28            //dc.SubmitChanges();
29            //Console.WriteLine("Finished");
30
31            ClientService cs = new ClientService();
32
33            DT.Client c = new DT.Client();
34
35            c.Id = Guid.NewGuid();
36            c.Name = "Eagle-Eye";
37            c.Description = "Development-PC";
38            c.IPAdress = "192.168.0.1";
39
40            //c.ResourceType = "Client";
41            DT.ResourceGroup r = new DT.ResourceGroup();
42            r.Name = "test";
43
44            r.Id = cs.AddResourceGroup(r);
45
46            c.ResourceGroup = r.Id;
47            c.Id = cs.AddClient(c);
48           
49            //ResourceResourceGroup rrg = new ResourceResourceGroup();
50            //rrg.ResourceGroup = r;
51            //rrg.Client = c;
52           
53           
54            //dc.GetTable<Resource>().InsertOnSubmit(r);
55            //dc.GetTable<Resource>().InsertOnSubmit(c);
56
57            //dc.GetTable<ResourceResourceGroup>().InsertOnSubmit(rrg);
58
59            //dc.SubmitChanges();
60
61           
62           // cs.GetClients();
63
64            //cs.DeleteClient(c);
65           cs.DeleteResourceGroup(r);
66
67
68        }
69    }
70}
Note: See TracBrowser for help on using the repository browser.