dotMemory Unit
 
Get dotMemory Unit

Simple Cases. AssertTraffic Attribute

Last modified: 10 May 2022

For simple assertions about traffic, you can use the AssertTraffic attribute. It allows you to assert that a test allocates less than a specific number of objects or memory amount.

The main limitation of such an approach is that traffic is calculated for the entire unit test and only for allocated objects. Thus, if you want to check traffic on a specific time interval or make assertions about collected objects, you should use the Traffic type.

You can add any number of AssertTraffic attributes in case you want to filter traffic by a number of conditions.