- Timestamp:
- 11/27/10 09:20:02 (14 years ago)
- Location:
- branches/ClientManagement/HeuristicLab.Services.Authentication/Test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClientManagement/HeuristicLab.Services.Authentication/Test/Program.cs
r4732 r4953 3 3 using System.Linq; 4 4 using System.Text; 5 using HeuristicLab.Services.Authentication.DataAccess; 5 using HeuristicLab.Services.Authentication; 6 using DA = HeuristicLab.Services.Authentication.DataAccess; 7 using DT = HeuristicLab.Services.Authentication.DataTransfer; 6 8 7 9 namespace Test … … 12 14 { 13 15 14 ClientManagmentDataContext dc = new ClientManagmentDataContext(@"Data Source=nb-1\sqlexpress;Initial Catalog=HeuristicLab.ClientManagment;Integrated Security=SSPI;"); 15 16 if (dc.DatabaseExists()) { 17 Console.WriteLine("DB exsits"); 18 dc.DeleteDatabase(); 19 Console.WriteLine("DB deleted"); 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"); 20 25 } 21 26 Console.WriteLine("DB create"); 22 27 dc.CreateDatabase(); 28 dc.SubmitChanges(); 23 29 Console.WriteLine("Finished"); 24 25 26 Client c = new Client(); 30 31 ClientService cs = new ClientService(); 32 33 DT.Client c = new DT.Client(); 27 34 28 35 c.Id = Guid.NewGuid(); … … 30 37 c.Description = "Development-PC"; 31 38 c.IPAdress = "192.168.0.1"; 39 32 40 //c.ResourceType = "Client"; 33 ResourceGroup r = newResourceGroup();41 DT.ResourceGroup r = new DT.ResourceGroup(); 34 42 r.Name = "test"; 35 43 36 ResourceResourceGroup rrg = new ResourceResourceGroup(); 37 rrg.ResourceGroup = r; 38 rrg.Client = c; 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; 39 52 40 53 41 dc.GetTable<Resource>().InsertOnSubmit(r);42 dc.GetTable<Resource>().InsertOnSubmit(c);54 //dc.GetTable<Resource>().InsertOnSubmit(r); 55 //dc.GetTable<Resource>().InsertOnSubmit(c); 43 56 44 dc.GetTable<ResourceResourceGroup>().InsertOnSubmit(rrg);57 //dc.GetTable<ResourceResourceGroup>().InsertOnSubmit(rrg); 45 58 46 dc.SubmitChanges();59 //dc.SubmitChanges(); 47 60 61 62 // cs.GetClients(); 48 63 64 //cs.DeleteClient(c); 65 cs.DeleteResourceGroup(r); 49 66 50 67 -
branches/ClientManagement/HeuristicLab.Services.Authentication/Test/Test.csproj
r4583 r4953 53 53 <Name>HeuristicLab.Services.Authentication.DataAccess</Name> 54 54 </ProjectReference> 55 <ProjectReference Include="..\HeuristicLab.Services.Authentication.DataTransfer\HeuristicLab.Services.Authentication.DataTransfer.csproj"> 56 <Project>{73E5113E-A293-4384-8B16-3CE38F2CFDC9}</Project> 57 <Name>HeuristicLab.Services.Authentication.DataTransfer</Name> 58 </ProjectReference> 59 <ProjectReference Include="..\HeuristicLab.Services.Authentication\HeuristicLab.Services.Authentication.csproj"> 60 <Project>{ED8DC6E8-57C6-49E0-8CDF-25703AC52350}</Project> 61 <Name>HeuristicLab.Services.Authentication</Name> 62 </ProjectReference> 55 63 </ItemGroup> 56 64 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Note: See TracChangeset
for help on using the changeset viewer.