NUnit.Framework.Assert.True(bool)

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

200 Examples 7

1. Example

Project: ContinuousTests
Source File: TestFixtureTests.cs
View license
[Test]
            public void CanRunTestInInternalTestFixture()
            {
                Assert.True(true);
            }

2. Example

View license
[Test]
        public void AddingElementFiresChangedEvent()
        {
            XmlHelper.AddElement(doc.RootNode, "Settings");
            Assert.True(gotChangeNotice);
        }

3. Example

Project: ContinuousTests
Source File: TestFixtureTests.cs
View license
[Test]
            public void CanRunTestInProtectedTestFixture()
            {
                Assert.True(true);
            }

4. Example

View license
[Test]
        public void AddingElementMakesProjectDirty()
        {
            XmlHelper.AddElement(doc.RootNode, "Settings");
            Assert.True(doc.HasUnsavedChanges);
        }

5. Example

Project: ContinuousTests
Source File: TestFixtureTests.cs
View license
[Test]
            public void CanRunTestInPrivateTestFixture()
            {
                Assert.True(true);
            }

6. Example

Project: ContinuousTests
Source File: TestFixtureTests.cs
View license
[Test]
            public void CanRunTestInInternalTestFixture()
            {
                Assert.True(true);
            }

7. Example

Project: ContinuousTests
Source File: ThreadingFixture.cs
View license
[Test, RequiresThread]
		public void MethodWithThreeAsserts()
		{
			Assert.True(true);
			Assert.True(true);
			Assert.True(true);
		}

8. Example

Project: ContinuousTests
Source File: EqualTest.cs
View license
[Test]
		public void CanCompareArrayContainingSelfToSelf()
		{
			object[] array = new object[1];
			array[0] = array;
			NUnitEqualityComparer comparer = new NUnitEqualityComparer();
			Assert.True(comparer.ObjectsEqual(array, array));
		}

9. Example

Project: ContinuousTests
Source File: ThreadingFixture.cs
View license
[Test, RequiresThread]
		public void MethodWithThreeAsserts()
		{
			Assert.True(true);
			Assert.True(true);
			Assert.True(true);
		}

10. Example

Project: ContinuousTests
Source File: EqualTest.cs
View license
[Test]
		public void CanCompareArrayContainingSelfToSelf()
		{
			object[] array = new object[1];
			array[0] = array;
			NUnitEqualityComparer comparer = new NUnitEqualityComparer();
			Assert.True(comparer.ObjectsEqual(array, array));
		}

11. Example

View license
[Test]
        public void AddingAttributeMakesProjectDirty()
        {
            XmlHelper.AddAttribute(doc.RootNode, "Version", "1.0");
            Assert.True(doc.HasUnsavedChanges);
        }

12. Example

View license
[Test]
        public void AddingAttributeFiresChangedEvent()
        {
            XmlHelper.AddAttribute(doc.RootNode, "Version", "1.0");
            Assert.True(gotChangeNotice);
        }

13. Example

Project: ContinuousTests
Source File: ThreadingFixture.cs
View license
[Test, RequiresThread]
		public void MethodWithThreeAsserts()
		{
			Assert.True(true);
			Assert.True(true);
			Assert.True(true);
		}

14. Example

Project: ContinuousTests
Source File: TestFixtureTests.cs
View license
[Test]
            public void CanRunTestInPrivateTestFixture()
            {
                Assert.True(true);
            }

15. Example

Project: ContinuousTests
Source File: TestFixtureTests.cs
View license
[Test]
            public void CanRunTestInPrivateTestFixture()
            {
                Assert.True(true);
            }

16. Example

Project: ContinuousTests
Source File: TestFixtureTests.cs
View license
[Test]
            public void CanRunTestInInternalTestFixture()
            {
                Assert.True(true);
            }

17. Example

Project: ContinuousTests
Source File: TestFixtureTests.cs
View license
[Test]
            public void CanRunTestInProtectedTestFixture()
            {
                Assert.True(true);
            }

18. Example

Project: ContinuousTests
Source File: TestFixtureTests.cs
View license
[Test]
            public void CanRunTestInProtectedTestFixture()
            {
                Assert.True(true);
            }

19. Example

Project: Colore
Source File: ResultTests.cs
View license
[Test]
        public void SuccessShouldImplicitCastToTrueBool()
        {
            bool test = Result.RzSuccess;
            Assert.True(test);
        }

20. Example

Project: Colore
Source File: ResultTests.cs
View license
[Test]
        public void SuccessPropertyShouldBeTrueOnSuccess()
        {
            Assert.True(Result.RzSuccess.Success);
        }

21. Example

Project: Colore
Source File: ResultTests.cs
View license
[Test]
        public void FailedPropertyShouldBeTrueOnFailure()
        {
            Assert.True(Result.RzFailed.Failed);
        }

22. Example

Project: Colore
Source File: ResultTests.cs
View license
[Test]
        public void SuccessShouldEqualTrue()
        {
            Assert.True(Result.RzSuccess);
        }

23. Example

View license
[Test]
        public void Equals_SameBuild_ReturnsTrue()
        {
            // Arrange

            var version = new ClusterVersion(new System.Version(1, 0, 0), 100);

            // Act

            var result = version.Equals(new ClusterVersion(new System.Version(1, 0, 0), 100));

            // Assert

            Assert.True(result);
        }

24. Example

View license
[Test]
        public void Equals_SameSuffix_ReturnsTrue()
        {
            // Arrange

            var version = new ClusterVersion(new System.Version(1, 0, 0), 100, "suffix");

            // Act

            var result = version.Equals(new ClusterVersion(new System.Version(1, 0, 0), 100, "suffix"));

            // Assert

            Assert.True(result);
        }

25. Example

View license
[Test]
        public void Equals_SameVersion_ReturnsTrue()
        {
            // Arrange

            var version = new ClusterVersion(new System.Version(1, 0, 0));

            // Act

            var result = version.Equals(new ClusterVersion(new System.Version(1, 0, 0)));

            // Assert

            Assert.True(result);
        }

26. Example

View license
[Test]
        public void HasSettings_WithCustomObjectCreator_ReturnsTrue()
        {
            // Arrange

            var settings = new DeserializationOptions()
            {
                CustomObjectCreator = new Mock<ICustomObjectCreator>().Object
            };

            // Act

            var result = settings.HasSettings;

            // Assert

            Assert.True(result);
        }

27. Example

Project: Ensconce
Source File: TemporaryDatabaseTests.cs
View license
[Test]
        public void should_drop_database_when_deployed_with_dropDatabase_option()
        {
            using (var sut = new TemporaryDatabase())
            {
                sut.Deploy(string.Empty, string.Empty, true);
                Assert.True(!sut.Exists());
            }
        }

28. Example

Project: Cirqus
Source File: TestConfigurationApi.cs
View license
[Test]
        public void CanDecorateAggregateRootRepositoryForTestContext()
        {
            var decorated = true;
            TestContext.With()
                .AggregateRootRepository(x => x.Decorate(c =>
                {
                    decorated = true;
                    return c.Get<IAggregateRootRepository>();
                }))
                .Create();

            Assert.True(decorated);
        }

29. Example

Project: Scripty
Source File: ScriptyRunnerTests.cs
View license
[Test]
        public void ShouldAddSingleScriptFile()
        {
            // Given
            ScriptyFixture fixture = new ScriptyFixture(r => r.Evaluate("file.csx"));

            // When
            ToolFixtureResult result = fixture.Run();

            // Then
            FilePath proj = fixture.GetProjectFilePath();
            Assert.True(result.Args == $"\"{proj}\" \"file.csx\"");
        }

30. Example

Project: Scripty
Source File: ScriptyRunnerTests.cs
View license
[Test]
        public void ShouldAddMultipleFiles()
        {
            // Given
            ScriptyFixture fixture = new ScriptyFixture(r => r.Evaluate("file.csx", "script.csx"));

            // When
            ToolFixtureResult result = fixture.Run();

            // Then
            FilePath proj = fixture.GetProjectFilePath();
            Assert.True(result.Args == $"\"{proj}\" \"file.csx\" \"script.csx\"");
        }

31. Example

Project: Scripty
Source File: ScriptyRunnerTests.cs
View license
[Test]
        public void ShouldAddProjectFile()
        {
            // Given
            ScriptyFixture fixture = new ScriptyFixture(r => r.Evaluate("file.csx"));

            // When
            ToolFixtureResult result = fixture.Run();

            // Then
            FilePath proj = fixture.GetProjectFilePath();
            Assert.True(result.Args.StartsWith($"\"{proj}\""));
        }

32. Example

Project: DbUp
Source File: UpgradeDatabaseScenarios.cs
View license
private void ThenUpgradeShouldBeRequired()
        {
            Assert.True(isUpgradeRequired);
        }

33. Example

View license
[Test]
        public async Task Update_Account_NameChanged()
        {
            const string originalName = "New Account";
            const string newName = "New Account 2";

            var account = new Account { Name = originalName, Description = "New Account Description" };
            var successResponse = await _client.CreateAsync("Account", account);
            account.Name = newName;
            await _client.UpdateAsync("Account", successResponse.Id, account);

            var result = await _client.QueryByIdAsync<Account>("Account", successResponse.Id);

            Assert.True(result.Name == newName);
        }

34. Example

Project: designscript-archive
Source File: EventTest.cs
View license
[Test]
        public void RunDSPropertyChangedTest()
        {
            string code =
@"class Foo
{
    x;
}
f = Foo();
f.x = 41;
";
            runner_.PreStart(code, runconfig_);
            PropertyChangedVerifier v = new PropertyChangedVerifier();
            // ProtoFFI.FFIPropertyChangedMonitor.GetInstance().RegisterDSPropertyChangedHandler("f", "x", v.DSPropertyChanged);

            DebugRunner.VMState vms;
            vms = runner_.StepOver();
            vms = runner_.StepOver();
            vms = runner_.StepOver();
            Assert.True(v.IsNotified);
        }

35. Example

View license
[Test]
        [Ignore("Requires the federation plugin to work")]
        public void Should_be_able_to_create_parameter()
        {
            try
            {
                managementClient.DeleteParameter("federation-upstream", vhostName, "myfakefederationupstream");
            }
            catch (UnexpectedHttpStatusCodeException ex)
            {
                if (ex.StatusCodeNumber != 404)
                {
                    throw;
                }
            }
            
            managementClient.CreateParameter(new Parameter
            {
                Component = "federation-upstream",
                Name = "myfakefederationupstream",
                Vhost = vhostName,
                Value = new {uri = "amqp://guest:[email protected]"}
            });
            Assert.True(managementClient.GetParameters().Where(p=>p.Name == "myfakefederationupstream").Any());
        }

36. Example

Project: TabulaRasa
Source File: DocxDocumentTests.cs
View license
[Test]
    	public void CanCheckFieldAvailabilityUsingItsName()
    	{
			using (var document = new DocxDocument(Resources.WithSdtElements))
			{
				var hasBlockField = document.Fields.Contains("BlockField");
				var hasInlineField = document.Fields.Contains("InlineField");

				Assert.True(hasBlockField);
				Assert.True(hasInlineField);
			}
    	}

37. Example

Project: TabulaRasa
Source File: DocxDocumentTests.cs
View license
[Test]
    	public void CanCheckFieldAvailabilityUsingItsTag()
    	{
			using (var document = new DocxDocument(Resources.WithSdtElements))
			{
				var hasBlockField = document.Fields.Contains(tag: "FirstTag");
				var hasInlineField = document.Fields.Contains(tag: "SecondTag");

				Assert.True(hasBlockField);
				Assert.True(hasInlineField);
			}
    	}

38. Example

View license
private static void CompareDocuments(DocxDocument expected, DocxDocument actual)
        {
            Assert.True(new DocxDocumentEqualityComparer().Equals(expected, actual));
        }

39. Example

Project: CoCSharp
Source File: TokenUtilsTests.cs
View license
[Test]
        public void TestTokenUtilsGenerateToken()
        {
            var token = TokenUtils.GenerateToken();
            Assert.True(TokenUtils.CheckToken(token));
        }

40. Example

Project: CoCSharp
Source File: AssetManagerTests.cs
View license
[Test]
        public void IsLoaded_CsvDataTableBuildingData_ReturnsTrue()
        {
            _manager.Load<CsvDataTable<BuildingData>>("csv/buildings.csv");
            var value = _manager.IsLoaded<CsvDataTable<BuildingData>>();

            Assert.True(value);
        }

41. Example

Project: SeleniumBasic
Source File: TS_ExecuteScript.cs
View license
[TestCase]
        public void ShouldProcessWebElement() {
            //Webelement
            var ele = driver.FindElementById("input__text");
            var resEle = (WebElement)driver.ExecuteScript("return arguments[0];", ele);
            A.True(ele.Equals(resEle));
        }

42. Example

Project: SeleniumBasic
Source File: TS_Element.cs
View license
[TestCase]
        public void ShouldReturnActiveElement() {
            var ele1 = driver.FindElementById("input__search");
            ele1.SendKeys("");

            var ele2 = driver.ActiveElement();
            A.True(ele1.Equals(ele2));
        }

43. Example

Project: Mages
Source File: PrimeNumberTests.cs
View license
[Test]
        public void ThirteenIsPrime()
        {
            var result = PrimeNumber.Check(13);
            Assert.True(result);
        }

44. Example

Project: Mages
Source File: PrimeNumberTests.cs
View license
[Test]
        public void MediumIsPrime()
        {
            var result = PrimeNumber.Check(7919);
            Assert.True(result);
        }

45. Example

Project: Mages
Source File: PrimeNumberTests.cs
View license
[Test]
        public void LargeIsPrime()
        {
            var result = PrimeNumber.Check(10006721);
            Assert.True(result);
        }

46. Example

Project: StravaSharp
Source File: ActivityTest.cs
View license
[Test]
        public async Task GetActivities()
        {
            var client = TestHelper.CreateStravaClient();
            var activities = await client.Activities.GetAthleteActivities();
            Assert.True(activities.Count > 0);
        }

47. Example

Project: StravaSharp
Source File: ActivityTest.cs
View license
[Test]
        public async Task GetActivitiesOfFollowedAthletes()
        {
            var client = TestHelper.CreateStravaClient();
            var currentAthlete = await client.Athletes.GetCurrent();
            var activities = await client.Activities.GetFollowingActivities();
            Assert.True(activities.Count > 0);
            var otherActivities = activities.Where(activity => activity.Athlete.Id != currentAthlete.Id);
            Assert.True(otherActivities.Count() > 0);
        }

48. Example

Project: StravaSharp
Source File: ActivityTest.cs
View license
[Test]
        public async Task GetLaps()
        {
            var client = TestHelper.CreateStravaClient();
            var activities = await client.Activities.GetAthleteActivities();
            Assert.True(activities.Count > 0);
            foreach (var activity in activities)
            {
                var laps = await client.Activities.GetLaps(activity.Id);
                Assert.True(laps.Count > 0);
            }
        }

49. Example

Project: gauge-csharp
Source File: StepRegistryTests.cs
View license
[Test]
        public void ShouldGetAliasWhenExists()
        {
            var methods = new[]
            {
                new KeyValuePair<string, GaugeMethod>("Foo", new GaugeMethod {Name = "Foo"}),
                new KeyValuePair<string, GaugeMethod>("FooAlias", new GaugeMethod {Name = "Foo"}),
                new KeyValuePair<string, GaugeMethod>("Bar", new GaugeMethod {Name = "Bar"})
            };
            var stepRegistry = new StepRegistry(methods, null,
                new Dictionary<string, bool> {{"Foo", true}, {"FooAlias", true}});

            Assert.True(stepRegistry.HasAlias("Foo"));
            Assert.True(stepRegistry.HasAlias("FooAlias"));
        }

50. Example

Project: gauge-csharp
Source File: StepRegistryTests.cs
View license
[Test]
        public void ShouldContainMethodForStepDefined()
        {
            var methods = new[]
            {
                new KeyValuePair<string, GaugeMethod>("Foo", new GaugeMethod {Name = "Foo"}),
                new KeyValuePair<string, GaugeMethod>("Bar", new GaugeMethod {Name = "Bar"})
            };
            var stepRegistry = new StepRegistry(methods, null, null);

            Assert.True(stepRegistry.ContainsStep("Foo"));
            Assert.True(stepRegistry.ContainsStep("Bar"));
        }