Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/27/10 09:20:02 (14 years ago)
Author:
jhaider
Message:

#1197
WebService implementation

Location:
branches/ClientManagement/HeuristicLab.Services.Authentication/Test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ClientManagement/HeuristicLab.Services.Authentication/Test/Program.cs

    r4732 r4953  
    33using System.Linq;
    44using System.Text;
    5 using HeuristicLab.Services.Authentication.DataAccess;
     5using HeuristicLab.Services.Authentication;
     6using DA = HeuristicLab.Services.Authentication.DataAccess;
     7using DT = HeuristicLab.Services.Authentication.DataTransfer;
    68
    79namespace Test
     
    1214        {
    1315
    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");
    2025            }
    2126            Console.WriteLine("DB create");
    2227            dc.CreateDatabase();
     28            dc.SubmitChanges();
    2329            Console.WriteLine("Finished");
    24                      
    25            
    26             Client c = new Client();
     30
     31            ClientService cs = new ClientService();
     32
     33            DT.Client c = new DT.Client();
    2734
    2835            c.Id = Guid.NewGuid();
     
    3037            c.Description = "Development-PC";
    3138            c.IPAdress = "192.168.0.1";
     39
    3240            //c.ResourceType = "Client";
    33             ResourceGroup r = new ResourceGroup();
     41            DT.ResourceGroup r = new DT.ResourceGroup();
    3442            r.Name = "test";
    3543
    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;
    3952           
    4053           
    41             dc.GetTable<Resource>().InsertOnSubmit(r);
    42             dc.GetTable<Resource>().InsertOnSubmit(c);
     54            //dc.GetTable<Resource>().InsertOnSubmit(r);
     55            //dc.GetTable<Resource>().InsertOnSubmit(c);
    4356
    44             dc.GetTable<ResourceResourceGroup>().InsertOnSubmit(rrg);
     57            //dc.GetTable<ResourceResourceGroup>().InsertOnSubmit(rrg);
    4558
    46             dc.SubmitChanges();
     59            //dc.SubmitChanges();
    4760
     61           
     62           // cs.GetClients();
    4863
     64            //cs.DeleteClient(c);
     65           cs.DeleteResourceGroup(r);
    4966
    5067
  • branches/ClientManagement/HeuristicLab.Services.Authentication/Test/Test.csproj

    r4583 r4953  
    5353      <Name>HeuristicLab.Services.Authentication.DataAccess</Name>
    5454    </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>
    5563  </ItemGroup>
    5664  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Note: See TracChangeset for help on using the changeset viewer.