Provides binary data from resource contents.

Namespace:  MbUnit.Framework
Assembly:  MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.459.0)

Syntax

C#
public class BinaryDataAttribute : ContentAttribute
Visual Basic (Declaration)
Public Class BinaryDataAttribute _
	Inherits ContentAttribute

Examples

This example reads data from an Embedded Resource called Data.bin within the same namespace as the test fixture.

CopyC#
public class AccountingTests
{
    [Test]
    public void ShoppingCartTotalWithSingleItem([BinaryData(ResourcePath = "Data.bin")] byte[] data)
    {
        // Code logic here...
    }
}

Inheritance Hierarchy

See Also