private static void Verify(SuiteRun suiteRun, string suiteRef, int passed, int failed, int notRun, string description, DateTime testtime) { Assert.AreEqual(testtime, suiteRun.Stamp); Assert.AreEqual(suiteRef, suiteRun.Name); Assert.AreEqual(description, suiteRun.Description); Assert.AreEqual(suiteRef, suiteRun.SuiteRef); Assert.AreEqual(passed, suiteRun.Passed); Assert.AreEqual(failed, suiteRun.Failed); Assert.AreEqual(notRun, suiteRun.NotRun); }
private static void Verify(SuiteRun suiteRun, string suiteName, int passed, int failed, int notRun, DateTime? testtime) { Assert.AreEqual(suiteName, suiteRun.Name, "suiteRun.Name"); Assert.AreEqual(suiteName, suiteRun.SuiteRef, "suiteRun.SuiteRef"); if (testtime != null) Assert.AreEqual(testtime, suiteRun.Stamp, "suiteRun.Stamp"); Assert.AreEqual(passed, suiteRun.Passed, "suiteRun.Passed"); Assert.AreEqual(failed, suiteRun.Failed, "suiteRun.Failed"); Assert.AreEqual(notRun, suiteRun.NotRun, "suiteRun.NotRun"); }
public void SaveSuiteRun() { _svc.Initialize(Config, _mgr, null); var suiteRun = new SuiteRun("Name", "Description", DateTime.Now, "SuiteRef"); suiteRun.Passed = 1; suiteRun.Failed = 2; suiteRun.NotRun = 3; suiteRun.Elapsed = 4; _mgr.Publish(suiteRun); /* Validate * AsseType, Name, Description, Stamp, TestSuite, Passed, Failed, NotRun, Elapsed */ Assert.AreEqual(1, _lastsaved.Count); Asset lastSaved = _lastsaved[0].Assets[0]; Assert.AreEqual("TestRun", lastSaved.AssetType.Token); AssertSingleValueAttribute(suiteRun.Name, lastSaved, "TestRun.Name"); AssertSingleValueAttribute(suiteRun.Description, lastSaved, "TestRun.Description"); AssertSingleValueAttribute(suiteRun.Stamp, lastSaved, "TestRun.Date"); AssertSingleValueAttribute(_svc.StubCentral.Services.GetOid("TestSuite:9977"), lastSaved, "TestRun.TestSuite"); AssertSingleValueAttribute(suiteRun.Passed, lastSaved, "TestRun.Passed"); AssertSingleValueAttribute(suiteRun.Failed, lastSaved, "TestRun.Failed"); AssertSingleValueAttribute(suiteRun.NotRun, lastSaved, "TestRun.NotRun"); AssertSingleValueAttribute(suiteRun.Elapsed, lastSaved, "TestRun.Elapsed"); AssertNoLogExceptions(); }
public void DontSaveSuiteRunNoReference() { _svc.Initialize(Config, _mgr, null); var suiteRun = new SuiteRun("Name", "Description", DateTime.Now, null); _mgr.Publish(suiteRun); Assert.AreEqual(0, _lastsaved.Count); suiteRun = new SuiteRun("Name", "Description", DateTime.Now, "FooBar"); _mgr.Publish(suiteRun); Assert.AreEqual(0, _lastsaved.Count); AssertNoLogExceptions(); }