Exemple #1
0
        public void When_No_Properties_Enqueued_Then_Sets_DisplayName()
        {
            // Act
            var displayName = new HangfireBackgroundTaskWrapper(new BackgroundTaskEnvelope(new NoPropertiesTask())).ToString();

            // Assert
            displayName.Should().Be("NoPropertiesTask()");
        }
Exemple #2
0
        public void When_Properties_Enqueued_Then_Sets_DisplayName()
        {
            // Act
            var displayName = new HangfireBackgroundTaskWrapper(new BackgroundTaskEnvelope(new PropertiesTask
            {
                Prop1 = "A prop"
            })).ToString();

            // Assert
            displayName.Should().Be("PropertiesTask(\"Prop1\":\"A prop\")");
        }