protected override void Iterate() { IServiceFactory f = new TestFactory(GetCLV()); service.RegisterFactory(f); TestFmwk.Logln(f.ToString()); }
protected override void Iterate() { if (n < factories.Length) { IServiceFactory f = factories[n++]; bool success = service.UnregisterFactory(f); TestFmwk.Logln("factory: " + f + (success ? " succeeded." : " *** failed.")); } }
protected override void Iterate() { string id = GetCLV(); object o = service.Get(id, actualID); if (o != null) { TestFmwk.Logln(" id: " + id + " actual: " + actualID[0] + " result: " + o); } }
protected override void Iterate() { if (--n < 0) { n = list.Length - 1; } string id = list[n]; object o = service.Get(id); TestFmwk.Logln(" id: " + id + " result: " + o); }
internal void Test(String s, int start, int count, int index, int offset, int expected, bool flip) { char[] chars = s.ToCharArray(); String strng = s.Substring(start, count); // ICU4N: (start + count) - start == count int val1 = UChar.OffsetByCodePoints(chars, start, count, index, offset); int val2 = UChar.OffsetByCodePoints(strng, index - start, offset) + start; if (val1 != expected) { TestFmwk.Errln("char[] " + Str(s, start, count, index, offset) + "(" + val1 + ") != " + expected); } else if (val2 != expected) { TestFmwk.Errln("String " + Str(s, start, count, index, offset) + "(" + val2 + ") != " + expected); } else if (TestFmwk.IsVerbose()) { TestFmwk.Logln(Str(s, start, count, index, offset) + " == " + expected); } if (flip) { val1 = UChar.OffsetByCodePoints(chars, start, count, expected, -offset); val2 = UChar.OffsetByCodePoints(strng, expected - start, -offset) + start; if (val1 != index) { TestFmwk.Errln("char[] " + Str(s, start, count, expected, -offset) + "(" + val1 + ") != " + index); } else if (val2 != index) { TestFmwk.Errln("String " + Str(s, start, count, expected, -offset) + "(" + val2 + ") != " + index); } else if (TestFmwk.IsVerbose()) { TestFmwk.Logln(Str(s, start, count, expected, -offset) + " == " + index); } } }
protected override void Iterate() { var ids = service.GetVisibleIDs(); var iter = ids.GetEnumerator(); int n = 10; while (--n >= 0 && iter.MoveNext()) { string id = (string)iter.Current; object result = service.Get(id); TestFmwk.Logln("iter: " + n + " id: " + id + " result: " + result); } }
protected override void Iterate() { int s = factories.Count; if (s == 0) { factories = service.Factories(); } else { int n = r.Next(s); //IFactory f = (IFactory)factories.RemoveAt(n); IServiceFactory f = factories[n]; factories.Remove(f); bool success = service.UnregisterFactory(f); TestFmwk.Logln("factory: " + f + (success ? " succeeded." : " *** failed.")); } }
protected override void Iterate() { var names = GetDisplayNames(service, locale); var iter = names.GetEnumerator(); int n = 10; while (--n >= 0 && iter.MoveNext()) { var e = iter.Current; string dname = (string)e.Key; string id = (string)e.Value; object result = service.Get(id); // Note: IllegalMonitorStateException is thrown by the code // below on IBM JRE5 for AIX 64bit. For some reason, converting // int to string out of this statement resolves the issue. string num = (n).ToString(CultureInfo.InvariantCulture); TestFmwk.Logln(" iter: " + num + " dname: " + dname + " id: " + id + " result: " + result); } }