using System; using System.Collections.Generic; using System.Text; using P4API; namespace P4DotNetTestDriver { class test1 : testBase { public test1(string ServerPort) : base(ServerPort) { } public override bool Run() { P4Connection p4; p4 = new P4Connection(); p4.Port = _Port; p4.Connect(); p4.Client = "TestClient1"; p4.User = "TestUser1"; P4Record s = p4.Run("info")[0]; if (s["username"] != "*unknown*") { Console.WriteLine(s["username"]); } if (s["clientname"] != "*unknown*") { Console.WriteLine(s["clientname"]); } //So far so good... now let's create a client spec. P4Form f = p4.Fetch_Form("client"); foreach (string k in f.Keys) { // Console.WriteLine(String.Format("{0}:{1}", k, f[k])); } //f["description"] = "Shawn's API"; P4UnParsedRecordSet r = p4.Save_Form(f); foreach (string ers in r.Errors) { Console.WriteLine(ers); } p4.Disconnect(); return false; } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#7 | 5636 | Shawn Hladky |
1. Added test harness framework, and some initial tests 2. Fixed many bugs (oddly enough identified by the unit tests) 3. Fixes so will build 1.1 Framework (and build batch files actually work) 4. Pathetic attempt at documentation |
||
#6 | 5447 | Shawn Hladky | refactor, and added options class | ||
#5 | 5436 | Shawn Hladky | P4.Net -- Added some high-level functionality | ||
#4 | 5433 | Shawn Hladky | P4.Net More refactoring | ||
#3 | 5431 | Shawn Hladky |
Refactoring... step 1. |
||
#2 | 5411 | Shawn Hladky | WIP -- forms are working now. | ||
#1 | 5373 | Shawn Hladky | P4.Net: Still WIP, but some things starting to work |