public void CreateNewEventFromEventSourceWithNoMutator() { var source = new EmptyEvent { Id = Guid.NewGuid(), CorrelationId = "ABC123", CurrentUser = "******", OccurredTimeUtc = DateTime.UtcNow.Subtract(TimeSpan.FromMinutes(1)), }; var created = source.CreateNewEvent <EmptyEvent>(); created.Should().NotBeNull("because the created instance should exist"); // Verify new values are populated. created.Id.Should().NotBe(source.Id, "because the id should be a new value"); created.Id.Should().NotBe(default(Guid), "because the id should be populated"); created.OccurredTimeUtc.Should().NotBe(source.OccurredTimeUtc, "because the occurred time should be a new value"); created.OccurredTimeUtc.Should().NotBe(default(DateTime), "because the occurred time should be populated"); // Verify copied values are copied. created.CorrelationId.Should().Be(source.CorrelationId, "because the correlation identifier should be copied"); created.CurrentUser.Should().Be(source.CurrentUser, "because the current user should be copied"); }
public override void createUI(ISkillEvent value, EditorUI p) { base.createUI(value, p); this.ev = value as EmptyEvent; if (ev == null) { return; } }
public void Event() { var @event = new EmptyEvent(); var step = Step.Create("EventAsync", async context => { await _eventBus.PublishAsync(@event); return(Response.Ok()); }); var scenario = CreateScenario("Event performance", new[] { step }); NBomberRunner.RegisterScenarios(scenario).RunTest(); }
public void Initiate() { onEnter = new EmptyEvent(); onExit = new EmptyEvent(); }
public void EmptyEventHandler(DSPNode evNode, EmptyEvent ev) { Debug.Log("EmptyEventHandler"); Assert.That(evNode, Is.EqualTo(Node)); ++EmptyEventCallCount; }