public void GetConfQualityRuleChinese() { WSConnection _connection3 = new WSConnection() { Url = "http://dash-aed-tomcat:8585/CAST-Health-Engineering/rest/", Login = "******", Password = "******", IsActive = true, Name = "Default" }; TestUtility.SetCulture("zh-CN"); ICastRepsitory ccontext = new CastRepository(_connection3, null); if ("ABD".Equals(Environment.UserName)) { const string cdomainHref = "AAD/quality-indicators/7126/snapshots/1"; var result = ccontext.GetConfBusinessCriteria(cdomainHref); Assert.AreEqual("避免工件的已注释掉代码行/代码行的比率过高", result.Name); TestUtility.SetCulture("en-US"); ICastRepsitory ccontext2 = new CastRepository(_connection3, null); const string cdomainHref2 = "AAD/quality-indicators/7126/snapshots/1"; var result2 = ccontext2.GetConfBusinessCriteria(cdomainHref2); Assert.AreEqual("Avoid Artifacts with high Commented-out Code Lines/Code Lines ratio", result2.Name); return; } bool valid = ccontext.IsServiceValid(); Assert.IsTrue(valid); }
public void GetConfBusinessCriteria() { ICastRepsitory context = new CastRepository(_connection); const string domainHref = "AED1/quality-indicators/61001/snapshots/2"; var result = context.GetConfBusinessCriteria(domainHref); Assert.IsNotNull(result); }
public void GetConfQualityRuleChinese() { WSConnection _connection3 = new WSConnection() { Url = "http://dash-aed-tomcat:8888/Dashboard-Noc-170/rest/", Login = "******", Password = "******", IsActive = true, Name = "Default" }; TestUtility.SetCulture("zh-CN"); ICastRepsitory ccontext = new CastRepository(_connection3); if (Environment.UserName != "abd") { if (ccontext == null) { return; } if (!ccontext.IsServiceValid()) { return; } } const string cdomainHref = "ADG83/quality-indicators/7126/snapshots/1"; var result = ccontext.GetConfBusinessCriteria(cdomainHref); Assert.AreEqual("避免工件的已注释掉代码行/代码行的比率过高", result.Name); TestUtility.SetCulture("en-US"); ICastRepsitory ccontext2 = new CastRepository(_connection3); const string cdomainHref2 = "ADG83/quality-indicators/7126/snapshots/1"; var result2 = ccontext2.GetConfBusinessCriteria(cdomainHref2); Assert.AreEqual("Avoid Artifacts with high Commented-out Code Lines/Code Lines ratio", result2.Name); }
public void GetConfBusinessCriteria() { ICastRepsitory context = new CastRepository(_Connection); string domainHref = "ADG710/quality-indicators/61001/snapshots/14"; var result = context.GetConfBusinessCriteria(domainHref); Assert.IsNotNull(result); }