Class SelfLog.Assert.TestScope
Test scope that can be used to set expectations of what could/must be in SelfLog
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
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
Declaration
public void Dispose()
ExpectErrorThatContains(FixedString4096Bytes)
Expecting to have a message
Declaration
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
public void ExpectingOutOfMemory()