NUnit.Framework.Assert.AreNotEqual(long, long)

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

23 Examples 7

1. Example

Project: SharpZipLib
Source File: ZipEntryHandling.cs
View license
[Test]
		[Category("Zip")]
		public void DateTimeSetsDosTime()
		{
			var ze = new ZipEntry("Pok");

			long original = ze.DosTime;

			ze.DateTime = new DateTime(1987, 9, 12);
			Assert.AreNotEqual(original, ze.DosTime);
			Assert.AreEqual(0, TestHelper.CompareDosDateTimes(new DateTime(1987, 9, 12), ze.DateTime));
		}

2. Example

Project: ActivityManager
Source File: ZipTests.cs
View license
[Test]
		[Category("Zip")]
		public void DateTimeSetsDosTime()
		{
			ZipEntry ze = new ZipEntry("Pok");

			long original = ze.DosTime;

			ze.DateTime = new DateTime(1987, 9, 12);
			Assert.AreNotEqual(original, ze.DosTime);
			Assert.AreEqual(0, TestHelper.CompareDosDateTimes(new DateTime(1987, 9, 12), ze.DateTime));
		}

3. Example

Project: Gorgon
Source File: ZipTests.cs
View license
[Test]
		[Category("Zip")]
		public void DateTimeSetsDosTime()
		{
			ZipEntry ze = new ZipEntry("Pok");

			long original = ze.DosTime;

			ze.DateTime = new DateTime(1987, 9, 12);
			Assert.AreNotEqual(original, ze.DosTime);
			Assert.AreEqual(0, TestHelper.CompareDosDateTimes(new DateTime(1987, 9, 12), ze.DateTime));
		}

4. Example

View license
[Test]
        public void TestEmpty()
        {
            MemoryStream xvaStream = new MemoryStream();
            VirtualMachineBuilder vmb = new VirtualMachineBuilder();
            vmb.AddDisk("Foo", new MemoryStream(), Ownership.Dispose);
            vmb.Build(xvaStream);

            Assert.AreNotEqual(0, xvaStream.Length);

            VirtualMachine vm = new VirtualMachine(xvaStream);
            List<Disk> disks = new List<Disk>(vm.Disks);
            Assert.AreEqual(1, disks.Count);
            Assert.AreEqual(0, disks[0].Capacity);
        }

5. Example

Project: SkiaSharp
Source File: SKPixmapTest.cs
View license
[Test]
		public void ReadPixelCopiesData()
		{
			var info = new SKImageInfo(10, 10);

			using (var bmp1 = new SKBitmap(info))
			using (var pix1 = bmp1.PeekPixels())
			using (var bmp2 = new SKBitmap(info))
			using (var pix2 = bmp2.PeekPixels())
			{
				bmp1.Erase(SKColors.Blue);
				bmp1.Erase(SKColors.Green);

				Assert.AreNotEqual(Marshal.ReadInt64(pix1.GetPixels()), Marshal.ReadInt64(pix2.GetPixels()));

				var result = pix1.ReadPixels(pix2);

				Assert.True(result);

				Assert.AreEqual(Marshal.ReadInt64(pix1.GetPixels()), Marshal.ReadInt64(pix2.GetPixels()));
			}
		}

6. Example

Project: cloudb
Source File: StringDataTest.cs
View license
[Test]
		public void SimpleAppend() {
			IDataFile file = Transaction.GetFile(new Key(0, 0, 1), FileAccess.ReadWrite);
			Assert.IsNotNull(file);

			StringData data = new StringData(file);
			data.Append("test");
			Assert.AreNotEqual(0, file.Position);

			file.Position = 0;
			string s = data.Substring(0, 4);
			Assert.AreEqual("test", s);

			Commit();
		}

7. Example

Project: slipstream
Source File: SearchTests.cs
View license
[Test]
        public void CanSearchWithOrder()
        {
            var ascOrder = new object[][] { new object[] { "_id", "asc" } };
            var descOrder = new object[][] { new object[] { "_id", "desc" } };
            var modelModel = this.GetResource("core.meta_entity");

            var ascIds = (long[])modelModel.Search(null, ascOrder, 0, 0);
            var descIds = (long[])modelModel.Search(null, descOrder, 0, 0);

            Assert.AreEqual(ascIds.Length, descIds.Length);
            Assert.AreNotEqual(ascIds[0], descIds[0]);
            Assert.AreEqual(ascIds.Last(), descIds.First());
        }

8. Example

View license
[Test]
        public void TestNotEmpty()
        {
            MemoryStream xvaStream = new MemoryStream();
            VirtualMachineBuilder vmb = new VirtualMachineBuilder();

            MemoryStream ms = new MemoryStream();
            for (int i = 0; i < 1024 * 1024; ++i)
            {
                ms.Position = i * 10;
                ms.WriteByte((byte)(i ^ (i >> 8) ^ (i >> 16) ^ (i >> 24)));
            }

            vmb.AddDisk("Foo", ms, Ownership.Dispose);
            vmb.Build(xvaStream);

            Assert.AreNotEqual(0, xvaStream.Length);

            VirtualMachine vm = new VirtualMachine(xvaStream);
            List<Disk> disks = new List<Disk>(vm.Disks);
            Assert.AreEqual(1, disks.Count);
            Assert.AreEqual(10 * 1024 * 1024, disks[0].Capacity);

            Stream diskContent = disks[0].Content;
            for (int i = 0; i < 1024 * 1024; ++i)
            {
                diskContent.Position = i * 10;
                if ((byte)(i ^ (i >> 8) ^ (i >> 16) ^ (i >> 24)) != diskContent.ReadByte())
                {
                    Assert.Fail("Mismatch at offset " + i);
                }
            }
        }

9. Example

Project: nhibernate-core
Source File: FixtureByCode.cs
View license
[Test]
		public async Task Serializing_Session_After_Deleting_First_Child_In_List_Should_WorkAsync()
		{
			using (ISession session = OpenSession())
			{
				using (ITransaction transaction = session.BeginTransaction())
				{
					var p = await (session.Query<Parent>().SingleAsync());
					p.ChildrenList.RemoveAt(0);
					await (session.FlushAsync());
					await (transaction.CommitAsync());
				}

				using (MemoryStream stream = new MemoryStream())
				{
					BinaryFormatter formatter = new BinaryFormatter();
					formatter.Serialize(stream, session);

					Assert.AreNotEqual(0, stream.Length);
				}
			}
		}

10. Example

Project: AutoTest.Net
Source File: NotEqualFixture.cs
View license
[Test]
        public void NotEqualSameTypes()
        {
            byte b1 = 35;
            sbyte/n ..... /n //View Source file for more details /n }

11. Example

Project: AutoTest.Net
Source File: NotEqualFixture.cs
View license
[Test]
        public void NotEqualSameTypes()
        {
            byte b1 = 35;
            sbyte/n ..... /n //View Source file for more details /n }

12. Example

Project: AutoTest.Net
Source File: NotEqualFixture.cs
View license
[Test]
        public void NotEqualSameTypes()
        {
            byte b1 = 35;
            sbyte/n ..... /n //View Source file for more details /n }

13. Example

Project: nunit
Source File: NotEqualFixture.cs
View license
[Test]
        public void NotEqualSameTypes()
        {
            byte b1 = 35;
            sbyte/n ..... /n //View Source file for more details /n }

14. Example

Project: nunitlite
Source File: NotEqualFixture.cs
View license
[Test]
        public void NotEqualSameTypes()
        {
            byte b1 = 35;
            sbyte/n ..... /n //View Source file for more details /n }

15. Example

Project: nhibernate-core
Source File: FixtureByCode.cs
View license
[Test]
		public async Task Serializing_Session_After_Changing_Key_ChildrenMap_Should_WorkAsync()
		{
			using (ISession session = OpenSession())
			{
				using (ITransaction transaction = session.BeginTransaction())
				{
					var p = await (session.Query<Parent>().SingleAsync());
					var firstChild = p.ChildrenMap["first"];
					var secondChild = p.ChildrenMap["second"];
					p.ChildrenMap.Remove("first");
					p.ChildrenMap.Remove("second");
					p.ChildrenMap.Add("first", secondChild);
					p.ChildrenMap.Add("second", firstChild);
					await (session.FlushAsync());
					await (transaction.CommitAsync());
				}

				using (MemoryStream stream = new MemoryStream())
				{
					BinaryFormatter formatter = new BinaryFormatter();
					formatter.Serialize(stream, session);

					Assert.AreNotEqual(0, stream.Length);
				}
			}
		}

16. Example

Project: nhibernate-core
Source File: FixtureByCode.cs
View license
[Test]
		public void Serializing_Session_After_Reordering_ChildrenList_Should_Work()
		{
			using (ISession session = OpenSession())
			{
				using (ITransaction transaction = session.BeginTransaction())
				{
					var p = session.Query<Parent>().Single();
					var c = p.ChildrenList.Last();
					p.ChildrenList.Remove(c);
					p.ChildrenList.Insert(p.ChildrenList.Count - 1, c);
					session.Flush();
					transaction.Commit();
				}

				using (MemoryStream stream = new MemoryStream())
				{
					BinaryFormatter formatter = new BinaryFormatter();
					formatter.Serialize(stream, session);

					Assert.AreNotEqual(0, stream.Length);
				}
			}
		}

17. Example

Project: ContinuousTests
Source File: NotEqualFixture.cs
View license
[Test]
        public void NotEqualSameTypes()
        {
            byte b1 = 35;
            sbyte/n ..... /n //View Source file for more details /n }

18. Example

Project: nhibernate-core
Source File: FixtureByCode.cs
View license
[Test]
		public void Serializing_Session_After_Deleting_First_Child_In_List_Should_Work()
		{
			using (ISession session = OpenSession())
			{
				using (ITransaction transaction = session.BeginTransaction())
				{
					var p = session.Query<Parent>().Single();
					p.ChildrenList.RemoveAt(0);
					session.Flush();
					transaction.Commit();
				}

				using (MemoryStream stream = new MemoryStream())
				{
					BinaryFormatter formatter = new BinaryFormatter();
					formatter.Serialize(stream, session);

					Assert.AreNotEqual(0, stream.Length);
				}
			}
		}

19. Example

Project: nhibernate-core
Source File: FixtureByCode.cs
View license
[Test]
		public async Task Serializing_Session_After_Reordering_ChildrenList_Should_WorkAsync()
		{
			using (ISession session = OpenSession())
			{
				using (ITransaction transaction = session.BeginTransaction())
				{
					var p = await (session.Query<Parent>().SingleAsync());
					var c = p.ChildrenList.Last();
					p.ChildrenList.Remove(c);
					p.ChildrenList.Insert(p.ChildrenList.Count - 1, c);
					await (session.FlushAsync());
					await (transaction.CommitAsync());
				}

				using (MemoryStream stream = new MemoryStream())
				{
					BinaryFormatter formatter = new BinaryFormatter();
					formatter.Serialize(stream, session);

					Assert.AreNotEqual(0, stream.Length);
				}
			}
		}

20. Example

Project: nhibernate-core
Source File: FixtureByCode.cs
View license
[Test]
		public void Serializing_Session_After_Changing_Key_ChildrenMap_Should_Work()
		{
			using (ISession session = OpenSession())
			{
				using (ITransaction transaction = session.BeginTransaction())
				{
					var p = session.Query<Parent>().Single();
					var firstChild = p.ChildrenMap["first"];
					var secondChild = p.ChildrenMap["second"];
					p.ChildrenMap.Remove("first");
					p.ChildrenMap.Remove("second");
					p.ChildrenMap.Add("first", secondChild);
					p.ChildrenMap.Add("second", firstChild);
					session.Flush();
					transaction.Commit();
				}

				using (MemoryStream stream = new MemoryStream())
				{
					BinaryFormatter formatter = new BinaryFormatter();
					formatter.Serialize(stream, session);

					Assert.AreNotEqual(0, stream.Length);
				}
			}
		}

21. Example

Project: ContinuousTests
Source File: NotEqualFixture.cs
View license
[Test]
        public void NotEqualSameTypes()
        {
            byte b1 = 35;
            sbyte/n ..... /n //View Source file for more details /n }

22. Example

Project: ContinuousTests
Source File: NotEqualFixture.cs
View license
[Test]
        public void NotEqualSameTypes()
        {
            byte b1 = 35;
            sbyte/n ..... /n //View Source file for more details /n }

23. Example

Project: NosDB
Source File: TestTransactedCompoundFile.cs
View license
[Test]
        public void TestLargeWrite()
        {
            using (TempFile temp = new TempFil/n ..... /n //View Source file for more details /n }