public async void GetMessage_ClearSet_Clears() { var sut = new InMemoryHandler(); await sut.HandleMessageAsync(TestHelper.GetMessageMetaData()); sut.ClearOnGet = true; _ = sut.GetMessage(); Assert.Null(sut.GetMessage()); }
public async void InMemoryHandler_UsesUniquenessRef() { var sut = new InMemoryHandler(); sut.SetFormatter(new FlimFlamV2Formatter()); sut.ClearOnGet = false; var msg = TestHelper.GetMessageMetaData(); await sut.HandleMessageAsync(msg); sut.SetFormatter(new FlimFlamV2Formatter()); string first = sut.GetMessage(); string second = sut.GetMessage(); await sut.HandleMessageAsync(msg); ///When a formatter does not contain a uniqueness reference this string is used in its place Assert.DoesNotContain(BaseMessageFormatter.DEFAULT_UQR, first); Assert.Equal(first, second); }