public void ShouldGetAListOfRegisteredKeys() { var timelineBarRegistry = new TimelineBarRegistry(); timelineBarRegistry.RegisterTimelineBarElement("key1", () => new MockTimelineBarElement()); timelineBarRegistry.RegisterTimelineBarElement("key2", () => new MockTimelineBarElement()); var result = timelineBarRegistry.GetTimelineBarElementKeys(); Assert.AreEqual(2, result.Count); Assert.AreEqual("key1", result[0]); Assert.AreEqual("key2", result[1]); }
public void ShouldRegisterTimelineBarElement() { var timelineBarElement = new MockTimelineBarElement(); var timelineBarRegistry = new TimelineBarRegistry(); timelineBarRegistry.RegisterTimelineBarElement("key", () => timelineBarElement); Assert.AreEqual(timelineBarElement, timelineBarRegistry.GetTimelineBarElement("key")); }