NUnit.Framework.Assert.AreEqual(long, long, string, params object[])

Here are the examples of the csharp api class NUnit.Framework.Assert.AreEqual(long, long, string, params object[]) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: MimeKit
Source File: ChainedStreamTests.cs
View license
void AssertSeekResults (string operation)
		{
			int n = (int) Math.Min (master.Length - master.Position, mbuf.Length);
			int nread = chained.Read (cbuf, 0, n);
			int mread = master.Read (mbuf, 0, n);

			Assert.AreEqual (mread, nread, "Did not read the expected number of bytes from the chained stream after {0}", operation);
			Assert.AreEqual (master.Position, chained.Position, "The chained stream's position did not match after {0}", operation);

			for (int i = 0; i < n; i++)
				Assert.AreEqual (mbuf[i], cbuf[i], "The bytes read do not match after {0}", operation);
		}

2. Example

Project: MimeKit
Source File: ChainedStreamTests.cs
View license
async Task AssertSeekResultsAsync (string operation)
		{
			int n = (int) Math.Min (master.Length - master.Position, mbuf.Length);
			int nread = await chained.ReadAsync (cbuf, 0, n);
			int mread = await master.ReadAsync (mbuf, 0, n);

			Assert.AreEqual (mread, nread, "Did not read the expected number of bytes from the chained stream after {0}", operation);
			Assert.AreEqual (master.Position, chained.Position, "The chained stream's position did not match after {0}", operation);

			for (int i = 0; i < n; i++)
				Assert.AreEqual (mbuf[i], cbuf[i], "The bytes read do not match after {0}", operation);
		}