public void SetOwner_IfUnsupportedValueType_Throws() { // Arrange var jobject = CreateJsonObject(123); Guid g = Guid.NewGuid(); // Act & Assert ExceptionAssert.ThrowsArgumentNull(() => QueueCausalityManager.SetOwner(g, jobject), "token"); }
public void SetOwner_IfValidOwner_AddsOwner() { // Arrange var jobject = CreateJsonObject(new Payload { Val = 123 }); Guid g = Guid.NewGuid(); // Act QueueCausalityManager.SetOwner(g, jobject); // Assert AssertOwnerEqual(g, jobject.ToString()); }
public void SetOwner_IfEmptyOwner_DoesNotAddOwner() { // Arrange var jobject = CreateJsonObject(new Payload { Val = 123 }); Guid g = Guid.Empty; // Act QueueCausalityManager.SetOwner(g, jobject); // Assert AssertOwnerIsNull(jobject.ToString()); }