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

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

137 Examples 7

1. Example

Project: ContinuousTests
Source File: NotEqualFixture.cs
View license
[Test]
		public void NotEqual()
		{
			Assert.AreNotEqual( 5, 3 );
		}

2. Example

Project: ContinuousTests
Source File: NotEqualFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ) )]
		public void NotEqualFails()
		{
			expectedMessage =
				"  Expected: not 5" + Environment.NewLine +
				"  But was:  5" + Environment.NewLine;
			Assert.AreNotEqual( 5, 5 );
		}

3. Example

Project: ContinuousTests
Source File: NotEqualFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ) )]
		public void NotEqualFails()
		{
			expectedMessage =
				"  Expected: not 5" + Environment.NewLine +
				"  But was:  5" + Environment.NewLine;
			Assert.AreNotEqual( 5, 5 );
		}

4. Example

Project: ContinuousTests
Source File: NotEqualFixture.cs
View license
[Test]
		public void NotEqual()
		{
			Assert.AreNotEqual( 5, 3 );
		}

5. Example

Project: ContinuousTests
Source File: NotEqualFixture.cs
View license
[Test]
		public void NotEqual()
		{
			Assert.AreNotEqual( 5, 3 );
		}

6. Example

Project: ContinuousTests
Source File: NotEqualFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ) )]
		public void NotEqualFails()
		{
			expectedMessage =
				"  Expected: not 5" + Environment.NewLine +
				"  But was:  5" + Environment.NewLine;
			Assert.AreNotEqual( 5, 5 );
		}

7. Example

View license
[Test]
        public void RegisterDependencies_RegistersTypes()
        {
            var container = new IODependencyContainer();
            var unityContainer = new UnityContainer();

            container.RegisterDependencies(unityContainer);

            Assert.AreNotEqual(0, unityContainer.Registrations.Count());
        }

8. Example

View license
[Test]
        public void LocalizationDependencyContainer_Register_DoesRegistration()
        {
            var container = new LocalizationDependencyContainer();
            var unityContainer = new UnityContainer();
            container.RegisterDependencies(unityContainer);

            Assert.AreNotEqual(0, unityContainer.Registrations.Count());
        }

9. Example

View license
[Test]
        public void RegistersDependencies_DoesRegistrations()
        {
            var unityContainer = new UnityContainer();
            var container = new GraphicsDependencyContainer();

            container.RegisterDependencies(unityContainer);

            Assert.AreNotEqual(0, unityContainer.Registrations.Count());
        }

10. Example

View license
[Test]
        public void RegisterDependencies_RegistersTypes()
        {
            var container = new ConfigDependencyContainer();
            var unityContainer = new UnityContainer();

            container.RegisterDependencies(unityContainer);

            Assert.AreNotEqual(0, unityContainer.Registrations.Count());
        }

11. Example

Project: AssertMessage
Source File: NunitTests.cs
View license
public void AreNotEqual_should_have_message()
        {
            var expected = 1;
            var actual = 1;

            Assert.AreNotEqual(expected, actual);
        }

12. Example

Project: NsqSharp
Source File: SliceTest.cs
View license
[Test]
        public void TestGetHashCodeIsCalculating()
        {
            var s = new Slice<int>(new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 });
            int hash1 = s.GetHashCode();

            s = new Slice<int>(new[] { 1, 2, 3, 4, 5 });
            int hash2 = s.GetHashCode();

            Assert.AreNotEqual(0, hash1);
            Assert.AreNotEqual(0, hash2);
            Assert.AreNotEqual(hash1, hash2);
        }

13. Example

Project: Simple.Data
Source File: FunctionTest.cs
View license
[Test]
        public void CoalesceFunctionWorks()
        {
            var db = DatabaseHelper.Open();
            var date = new DateTime(1900, 1, 1);
            List<dynamic> q = db.Orders.Query(db.Orders.OrderDate.Coalesce(date) < DateTime.Now).ToList();
            Assert.AreNotEqual(0, q.Count);
        }

14. Example

View license
[Test()]
        public void SimpleTouchActionTestCase()
        {
            IList<AppiumWebElement> els = driver.FindElementsByClassName("android.widget.TextView");

            int number1 = els.Count;

            TouchAction tap = new TouchAction(driver);
            tap.Tap(els[4], 10, 5, 2).Perform();

            els = driver.FindElementsByClassName("android.widget.TextView");

            Assert.AreNotEqual(number1, els.Count);
        }

15. Example

View license
[Test]
        public void GetDeviceDictionaryData()
        {
            Dictionary<string, object> dictionary = (Dictionary<string, object>) driver.SessionDetails["desired"];
            Assert.AreNotEqual(dictionary.Count, 0);
        }

16. Example

Project: nunitlite
Source File: NotEqualFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ) )]
		public void NotEqualFails()
		{
			expectedMessage =
				"  Expected: not 5" + Env.NewLine +
				"  But was:  5" + Env.NewLine;
			Assert.AreNotEqual( 5, 5 );
		}

17. Example

Project: nunitlite
Source File: NotEqualFixture.cs
View license
[Test]
		public void NotEqual()
		{
			Assert.AreNotEqual( 5, 3 );
		}

18. Example

Project: nunit
Source File: NotEqualFixture.cs
View license
[Test]
        public void NotEqual()
        {
            Assert.AreNotEqual( 5, 3 );
        }

19. Example

Project: Smocks
Source File: AppDomainContextTests.cs
View license
[TestCase]
        public void InvokeAction_RunsInOtherAppDomain()
        {
            int otherAppDomainId = AppDomain.CurrentDomain.Id;

            var subject = new AppDomainContext(
                new AssemblyRewriter(_methodRewriterMock.Object, _moduleFilterMock.Object));
            subject.Invoke(() =>
            {
                otherAppDomainId = AppDomain.CurrentDomain.Id;
            });

            Assert.AreNotEqual(AppDomain.CurrentDomain.Id, otherAppDomainId);
        }

20. Example

Project: AutoTest.Net
Source File: NotEqualFixture.cs
View license
[Test]
		public void NotEqual()
		{
			Assert.AreNotEqual( 5, 3 );
		}

21. Example

Project: AutoTest.Net
Source File: NotEqualFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ) )]
		public void NotEqualFails()
		{
			expectedMessage =
				"  Expected: not 5" + Environment.NewLine +
				"  But was:  5" + Environment.NewLine;
			Assert.AreNotEqual( 5, 5 );
		}

22. Example

Project: AutoTest.Net
Source File: NotEqualFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ) )]
		public void NotEqualFails()
		{
			expectedMessage =
				"  Expected: not 5" + Environment.NewLine +
				"  But was:  5" + Environment.NewLine;
			Assert.AreNotEqual( 5, 5 );
		}

23. Example

Project: AutoTest.Net
Source File: NotEqualFixture.cs
View license
[Test]
		public void NotEqual()
		{
			Assert.AreNotEqual( 5, 3 );
		}

24. Example

Project: AutoTest.Net
Source File: NotEqualFixture.cs
View license
[Test]
		public void NotEqual()
		{
			Assert.AreNotEqual( 5, 3 );
		}

25. Example

Project: AutoTest.Net
Source File: NotEqualFixture.cs
View license
[Test, ExpectedException( typeof( AssertionException ) )]
		public void NotEqualFails()
		{
			expectedMessage =
				"  Expected: not 5" + Environment.NewLine +
				"  But was:  5" + Environment.NewLine;
			Assert.AreNotEqual( 5, 5 );
		}

26. Example

View license
[Test]
        public void Should_Compare_Two_Entities_Without_Id_HashCodes()
        {
            var model1 = new TestEquatableEntity();
            var model2 = new TestEquatableEntity();
            
            Assert.AreNotEqual(model1.GetHashCode(), model2.GetHashCode());
        }

27. Example

Project: NPOI
Source File: TestHSSFCell.cs
View license
[Test]
        public void TestGetDataFormatUniqueIndex()
        {
            HSSFWorkbook wb = new HSSFWorkbook();

            IDataFormat format = wb.CreateDataFormat();
            short formatidx1 = format.GetFormat("YYYY-mm/dd");
            short formatidx2 = format.GetFormat("YYYY-mm/dd");
            Assert.AreEqual(formatidx1, formatidx2);
            short formatidx3 = format.GetFormat("000000.000");
            Assert.AreNotEqual(formatidx1, formatidx3);
        }

28. Example

Project: NosDB
Source File: TestWorkQueue.cs
View license
[Test]
        public void TestThreadAborts()
        {
            int[] counter = new int[1];
            using (WorkQueue<int[]> worker = new WorkQueue<int[]>(ProcessOne, Math.Max(2, Environment.ProcessorCount)))
            {
                for (int i = 0; i < 1000; i++)
                    worker.Enqueue(counter);
                worker.Complete(false, 10);
            }
            Assert.AreNotEqual(0, counter[0]);
        }

29. Example

View license
[Test]
    public async Task Run()
    {
        var beforeAwaitId = Thread.CurrentThread.ManagedThreadId;
        await Task.Delay(30);
        Assert.AreNotEqual(Thread.CurrentThread.ManagedThreadId, beforeAwaitId);
    }

30. Example

View license
public static void AssertInvalid(this SchemaValidationResults results)
        {
            Assert.AreNotEqual(0, results.Errors.Count());
            Assert.AreEqual(false, results.Valid);
        }

31. Example

Project: 32feet
Source File: SdpHelperTests.cs
View license
[Test]
        public void GetChannelByte_Opp()
        {
            ServiceRecord rcd = ServiceRecord.CreateServiceRecordFromBytes(Data_CompleteThirdPartyRecords.PalmOsOpp);
            int value = ServiceRecordHelper.GetRfcommChannelNumber(rcd);
            Assert.AreNotEqual(-1, value);
            Assert.AreEqual(Data_CompleteThirdPartyRecords.PalmOsOpp_RfcommChannelNumber, (byte)value);
        }

32. Example

Project: Playnite
Source File: GameDatabaseTests.cs
View license
[Test]
        public void UpdateSteamInstalledGamesCleanImportTest()
        {
            var path = Path.Combine(Playnite.PlayniteTests.TempPath, "steaminstalledimportclean.db");
            FileSystem.DeleteFile(path);

            var db = new GameDatabase();
            using (db.OpenDatabase(path))
            {
                db.UpdateInstalledGames(Provider.Steam);
                Assert.AreNotEqual(0, db.GamesCollection.Count());
            }
        }

33. Example

Project: Playnite
Source File: GameDatabaseTests.cs
View license
[Test]
        public void UpdateOriginInstalledGamesCleanImportTest()
        {
            var path = Path.Combine(Playnite.PlayniteTests.TempPath, "origininstalledimportclean.db");
            FileSystem.DeleteFile(path);

            var db = new GameDatabase();
            using (db.OpenDatabase(path))
            {
                db.UpdateInstalledGames(Provider.Origin);
                Assert.AreNotEqual(0, db.GamesCollection.Count());
            }
        }

34. Example

Project: Playnite
Source File: GameDatabaseTests.cs
View license
[Test]
        public void UpdateUplayInstalledGamesCleanImportTest()
        {
            var path = Path.Combine(Playnite.PlayniteTests.TempPath, "uplayinstalledimportclean.db");
            FileSystem.DeleteFile(path);

            var db = new GameDatabase();
            using (db.OpenDatabase(path))
            {
                db.UpdateInstalledGames(Provider.Uplay);
                Assert.AreNotEqual(0, db.GamesCollection.Count());
            }
        }

35. Example

Project: Playnite
Source File: GameDatabaseTests.cs
View license
[Test]
        public void UpdateGogInstalledGamesCleanImportTest()
        {
            var path = Path.Combine(Playnite.PlayniteTests.TempPath, "goginstalledimportclean.db");
            FileSystem.DeleteFile(path);

            var db = new GameDatabase();
            using (db.OpenDatabase(path))
            {
                db.UpdateInstalledGames(Provider.GOG);
                Assert.AreNotEqual(0, db.GamesCollection.Count());
            }
        }

36. Example

Project: keepassrpc
Source File: TestJsonWriterBase.cs
View license
[ Test ]
        public void SetMaxDepth()
        {
            Assert.AreNotEqual(42, _writer.MaxDepth);
            _writer.MaxDepth = 42;
            Assert.AreEqual(42, _writer.MaxDepth);
        }

37. Example

Project: keepassrpc
Source File: TestJsonReaderBase.cs
View license
[Test]
        public void SetMaxDepth()
        {
            MockedJsonReader reader = new MockedJsonReader();
            Assert.AreNotEqual(42, reader.MaxDepth);
            reader.MaxDepth = 42;
            Assert.AreEqual(42, reader.MaxDepth);
        }

38. Example

Project: GribApi.NET
Source File: Get.cs
View license
[Test, Timeout(2000)]
			public void TestIterateLatLong()
			{
				using (var file = new GribFile(Settings.REDUCED_LATLON_GRB2)) {
					Assert.IsTrue(file.MessageCount > 0);
					foreach (var msg in file) {
						int c = msg.Count();

						msg.Namespace = "geography";

						Assert.AreNotEqual(c, msg.Count());

						Assert.IsTrue(msg.GeoSpatialValues.Any());
					}
				}
			}

39. Example

Project: linq2db
Source File: CountTests.cs
View license
[Test, DataContextSource]
		public void GroupByWhere(string context)
		{
			using (var db = GetDataContext(context))
			{
				var expected = Child.Count(ch => ch.ChildID > 20);
				Assert.AreNotEqual(0, expected);

				var result = db.Child.Count(ch => ch.ChildID > 20);
				Assert.AreEqual(expected, result);
			}
		}

40. Example

Project: AngleSharp
Source File: BasicConfiguration.cs
View license
[Test]
        public void ConfigurationWithExtensionLeavesOriginallyUnmodified()
        {
            var original = new Configuration();
            var modified = original.WithCss();
            Assert.AreNotSame(original, modified);
            Assert.AreNotEqual(original.Services.Count(), modified.Services.Count());
        }

41. Example

Project: AngleSharp
Source File: BasicConfiguration.cs
View license
[Test]
        public void ConfigurationSetCultureExtensionLeavesOriginallyUnmodified()
        {
            var original = new Configuration();
            var modified = original.SetCulture("de-at");
            Assert.AreNotSame(original, modified);
            Assert.AreNotEqual(original.Services.Count(), modified.Services.Count());
        }

42. Example

Project: LinqExtender
Source File: ExecutionFixture.cs
View license
[Test]
        public void ShouldNotCacheTakeOrSkipFromPreviousContext()
        {
            var expected = (from book in new FakeContext(GetBooks())select book).Skip(1).Take(1).ToArray();
            var actual = (from book in new FakeContext(GetBooks()) select book).ToArray();

            Assert.AreNotEqual(expected.Count(), actual.Count());
        }

43. Example

View license
[Test]
		public void WhenChangeReturns_NotEqualHashCode()
		{
			var sr1 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) }, new List<string> { "SOMETHING" });
			var sr2 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAliasChanged", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) }, new List<string> { "SOMETHING" });
			Assert.AreNotEqual(sr1.GetHashCode(), sr2.GetHashCode());
		}

44. Example

View license
[Test]
		public void WhenChangeSpace_NotEqualHashCode()
		{
			var sr1 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) }, new List<string> { "SOMETHING" });
			var sr2 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) }, new List<string> { "ANOTHER" });
			Assert.AreNotEqual(sr1.GetHashCode(), sr2.GetHashCode());
		}

45. Example

Project: FieldWorks
Source File: TestXAmpleDLLWrapper.cs
View license
[Test]
		public void GetAmpleThreadId()
		{
			using (XAmpleDLLWrapper wrapper = CreateXAmpleDllWrapper())
			{
				int threadId = wrapper.GetAmpleThreadId();
#if __MonoCS__
				Assert.AreEqual(0, threadId);
#else
				Assert.AreNotEqual(0, threadId);
#endif
			}
		}

46. Example

View license
[Test]
		public void GetHashCode_TwoDictionariesHaveDifferentKey_ReturnDifferentHashCodes()
		{
			var reference = new Dictionary<string, string> {{"key1", "value1"}, {"key2", "value2"}};
			var other = new Dictionary<string, string> {{"key1", "value1"}, {"key3", "value2"}};
			var comparer = new DictionaryEqualityComparer<string, string>();
			Assert.AreNotEqual(comparer.GetHashCode(reference), comparer.GetHashCode(other));
		}

47. Example

View license
[Test]
		public void GetHashCode_TwoDictionariesHaveDifferentLength_ReturnDifferentHashCodes()
		{
			var reference = new Dictionary<string, string> {{"key1", "value1"}, {"key2", "value2"}};
			var other = new Dictionary<string, string> {{"key1", "value1"}};
			var comparer = new DictionaryEqualityComparer<string, string>();
			Assert.AreNotEqual(comparer.GetHashCode(reference), comparer.GetHashCode(other));
		}

48. Example

Project: libpalaso
Source File: ResultSetTests.cs
View license
[Test]
		public void Constructor_ResultsModifiedAfter_ResultSetNotModified()
		{
			ResultSet<PalasoTestItem> resultSet = new ResultSet<PalasoTestItem>(_dataMapper, _results);
			_results.Add(new RecordToken<PalasoTestItem>(_dataMapper, _resultSet[2].Id));
			Assert.AreNotEqual(_results.Count, resultSet.Count);

		}

49. Example

View license
[Test]
		public void GetHashCode_TwoDictionariesHaveDifferentValue_ReturnDifferentHashCodes()
		{
			var reference = new Dictionary<string, string> {{"key1", "value1"}, {"key2", "value2"}};
			var other = new Dictionary<string, string> {{"key1", "value1"}, {"key2", "value3"}};
			var comparer = new DictionaryEqualityComparer<string, string>();
			Assert.AreNotEqual(comparer.GetHashCode(reference), comparer.GetHashCode(other));
		}

50. Example

View license
[Test]
        [Ignore("Enable when InspectorEntityAttribute works again (see issue #24 [https://git/n ..... /n //View Source file for more details /n }