NUnit.Framework.Assert.IsEmpty(System.Collections.IEnumerable, string)

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

12 Examples 7

1. Example

Project: duality
Source File: PackageEventListener.cs
View license
public void AssertEmpty()
		{
			Assert.IsEmpty(this.installEvents, "Install package events");
			Assert.IsEmpty(this.uninstallEvents, "Uninstall package events");
		}

2. Example

View license
[Test]
		public void IsEmpty()
		{
			Assert.IsEmpty( "", "Failed on empty String" );
			Assert.IsEmpty( new int[0], "Failed on empty Array" );
			Assert.IsEmpty( new ArrayList(), "Failed on empty ArrayList" );
			Assert.IsEmpty( new Hashtable(), "Failed on empty Hashtable" );
            Assert.IsEmpty( (IEnumerable)new int[0], "Failed on empty IEnumerable");
		}

3. Example

View license
[Test]
		public void IsEmpty()
		{
			Assert.IsEmpty( "", "Failed on empty String" );
			Assert.IsEmpty( new int[0], "Failed on empty Array" );
			Assert.IsEmpty( new ArrayList(), "Failed on empty ArrayList" );
			Assert.IsEmpty( new Hashtable(), "Failed on empty Hashtable" );
		}

4. Example

View license
[Test]
		public void IsEmpty()
		{
			Assert.IsEmpty( "", "Failed on empty String" );
			Assert.IsEmpty( new int[0], "Failed on empty Array" );
			Assert.IsEmpty( new ArrayList(), "Failed on empty ArrayList" );
			Assert.IsEmpty( new Hashtable(), "Failed on empty Hashtable" );
		}

5. Example

Project: nunitlite
Source File: ConditionAssertTests.cs
View license
[Test]
		public void IsEmpty()
		{
			Assert.IsEmpty( "", "Failed on empty String" );
			Assert.IsEmpty( new int[0], "Failed on empty Array" );
			Assert.IsEmpty( new ArrayList(), "Failed on empty ArrayList" );
			Assert.IsEmpty( new Hashtable(), "Failed on empty Hashtable" );
			Assert.IsEmpty( (IEnumerable)new int[0], "Failed on empty IEnumerable" );
		}

6. Example

Project: nunit
Source File: ConditionAssertTests.cs
View license
[Test]
        public void IsEmpty()
        {
            Assert.IsEmpty( "", "Failed on empty String" );
            Assert.IsEmpty( new int[0], "Failed on empty Array" );
            Assert.IsEmpty((IEnumerable)new int[0], "Failed on empty IEnumerable");

#if !NETCOREAPP1_1
            Assert.IsEmpty( new ArrayList(), "Failed on empty ArrayList" );
            Assert.IsEmpty( new Hashtable(), "Failed on empty Hashtable" );
#endif
        }

7. Example

View license
[Test]
		public void IsEmpty()
		{
			Assert.IsEmpty( "", "Failed on empty String" );
			Assert.IsEmpty( new int[0], "Failed on empty Array" );
			Assert.IsEmpty( new ArrayList(), "Failed on empty ArrayList" );
			Assert.IsEmpty( new Hashtable(), "Failed on empty Hashtable" );
            Assert.IsEmpty( (IEnumerable)new int[0], "Failed on empty IEnumerable");
		}

8. Example

View license
[Test]
		public void IsEmpty()
		{
			Assert.IsEmpty( "", "Failed on empty String" );
			Assert.IsEmpty( new int[0], "Failed on empty Array" );
			Assert.IsEmpty( new ArrayList(), "Failed on empty ArrayList" );
			Assert.IsEmpty( new Hashtable(), "Failed on empty Hashtable" );
		}

9. Example

View license
[Test]
		public void IsEmpty()
		{
			Assert.IsEmpty( "", "Failed on empty String" );
			Assert.IsEmpty( new int[0], "Failed on empty Array" );
			Assert.IsEmpty( new ArrayList(), "Failed on empty ArrayList" );
			Assert.IsEmpty( new Hashtable(), "Failed on empty Hashtable" );
		}

10. Example

View license
[Test]
        public void ResourceStringValidationValidExampleTest()
        {
            var testFile = GetDocFile();

            var resource = testFile.Resources.Single(x => x.Name == "example.resource");
            var schema = new JsonSchema(resource);

            var method = testFile.Requests.Single(x => x.Identifier == "valid-response");

            ValidationError[] detectedErrors;
            bool result = schema.ValidateExpectedResponse(method, out detectedErrors);
            Assert.IsTrue(result);
            Assert.IsEmpty(detectedErrors, "Validation errors were detected");
        }

11. Example

Project: DreamNJasmine
Source File: NUnitSuiteResult.cs
View license
public ISuiteResult doesNotHaveTestContaining(string skipped)
        {
            IEnumerable<XElement> matchingTests = GetTestsWithName(s => s.Contains(skipped));

            Assert.IsEmpty(matchingTests, String.Format("Expected not to have tests containing {0}, found: {1}", skipped, string.Join(", ", matchingTests.Select(t => t.Attribute("name").Value))));
            
            return this;
        }

12. Example

Project: linker
Source File: AssemblyChecker.cs
View license
public void Verify ()
		{
			// TODO: Implement fully, probably via custom Kept attribute
			Assert.IsFalse (linkedAssembly.MainModule.HasExportedTypes);

			VerifyCustomAttributes (linkedAssembly, originalAssembly);

			VerifyResources (originalAssembly, linkedAssembly);

			linkedMembers = new HashSet<string> (linkedAssembly.MainModule.AllMembers ().Select (s => {
				return s.FullName;
			}), StringComparer.Ordinal);

			var membersToAssert = originalAssembly.MainModule.Types;
			foreach (var originalMember in membersToAssert) {
				var td = originalMember as TypeDefinition;
				if (td != null) {
					if (td.Name == "<Module>") {
						linkedMembers.Remove (td.Name);
						continue;
					}

					TypeDefinition linkedType = linkedAssembly.MainModule.GetType (originalMember.FullName);
					VerifyTypeDefinition (td, linkedType);
					linkedMembers.Remove (td.FullName);

					continue;
				}

				throw new NotImplementedException ($"Don't know how to check member of type {originalMember.GetType ()}");
			}

			Assert.IsEmpty (linkedMembers, "Linked output includes unexpected member");
		}