Class SelfLog.Assert.TestScope
Test scope that can be used to set expectations of what could/must be in SelfLog
Inherited Members
Namespace: Unity.Logging.Internal.Debug
Syntax
public class TestScope : IDisposable
Constructors
TestScope(Allocator)
Constructor of the test scope. SelfLog must be enabled
Declaration
public TestScope(Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
Allocator | allocator | Allocator for internal expected message list |
Properties
IsCreated
True if created
Declaration
public bool IsCreated { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
CheckMessage(FixedString4096Bytes)
Checks if this message is expected
Declaration
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
public void CheckMessage(FixedString4096Bytes message)
Parameters
Type | Name | Description |
---|---|---|
FixedString4096Bytes | message | The message to check |
Dispose()
End of the scope, checks all the expected messages. See IDisposable
Declaration
public void Dispose()
Implements
ExpectErrorThatContains(FixedString4096Bytes)
Expecting to have a message
Declaration
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
public void ExpectErrorThatContains(FixedString4096Bytes expected)
Parameters
Type | Name | Description |
---|---|---|
FixedString4096Bytes | expected | Message that is expected in SelfLog |
ExpectingOutOfMemory()
Out of memory message is expected
Declaration
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
public void ExpectingOutOfMemory()