本文整理汇总了C#中Db4objects.Db4o.Foundation.Collection4.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Collection4.ToString方法的具体用法?C# Collection4.ToString怎么用?C# Collection4.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db4objects.Db4o.Foundation.Collection4
的用法示例。
在下文中一共展示了Collection4.ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test
public virtual void Test()
{
Collection4 expected = new Collection4(new object[] { "PING", true, 42 });
MessagingTestCaseBase.MessageCollector recipient = new MessagingTestCaseBase.MessageCollector
();
IObjectServer server = OpenServerWith(recipient);
try
{
IObjectContainer client = OpenClient("client", server);
try
{
IMessageSender sender = MessageSender(client);
SendAll(expected, sender);
}
finally
{
client.Close();
}
}
finally
{
server.Close();
}
Assert.AreEqual(expected.ToString(), recipient.messages.ToString());
}
示例2: TestMultiThread
public virtual void TestMultiThread()
{
DynamicVariable variable = new DynamicVariable();
Collection4 failures = new Collection4();
variable.With("mine", new _IRunnable_23(this, variable, failures));
Assert.IsNull(variable.Value);
Assert.IsTrue(failures.IsEmpty(), failures.ToString());
}
示例3: SameContent
public static void SameContent(IEnumerator expected, IEnumerator actual)
{
Collection4 allExpected = new Collection4(expected);
while (actual.MoveNext())
{
object current = actual.Current;
bool removed = allExpected.Remove(current);
if (!removed)
{
Unexpected(current);
}
}
Assert.IsTrue(allExpected.IsEmpty(), "Still missing: " + allExpected.ToString());
}
示例4: TestToString
public virtual void TestToString()
{
Collection4 c = new Collection4();
Assert.AreEqual("[]", c.ToString());
c.Add("foo");
Assert.AreEqual("[foo]", c.ToString());
c.Add("bar");
Assert.AreEqual("[foo, bar]", c.ToString());
}
示例5: AssertEntries
private void AssertEntries(PersistentEntry[] expected, IEnumerator actual)
{
Collection4 checklist = new Collection4(actual);
Assert.AreEqual(expected.Length, checklist.Size());
for (int i = 0; i < expected.Length; ++i)
{
PersistentEntry e = expected[i];
PersistentEntry a = EntryByUid(checklist.GetEnumerator(), e.uid);
if (a != null)
{
AssertEqualEntries(e, a);
checklist.Remove(a);
}
}
Assert.IsTrue(checklist.IsEmpty(), checklist.ToString());
}
示例6: AssertIterator
private void AssertIterator(Hashtable4 table, object[] keys)
{
var iter = table.Iterator();
var expected = new Collection4(keys);
while (iter.MoveNext())
{
var entry = (IEntry4) iter.Current;
var removedOK = expected.Remove(entry.Key());
Assert.IsTrue(removedOK);
}
Assert.IsTrue(expected.IsEmpty(), expected.ToString());
}
示例7: SameContent
public static void SameContent(IEnumerator expected, IEnumerator actual)
{
var allExpected = new Collection4();
while (expected.MoveNext())
{
allExpected.Add(expected.Current);
}
while (actual.MoveNext())
{
var current = actual.Current;
var removed = allExpected.Remove(current);
if (!removed)
{
Unexpected(current);
}
}
Assert.IsTrue(allExpected.IsEmpty(), allExpected.ToString());
}