public void AddCapabilityThrowsExceptionWithNullCapability()
        {
            var type = typeof(Person);

            var sut = new BuildHistory();

            Action action = () => sut.AddCapability(type, null !);

            action.Should().Throw <ArgumentNullException>();
        }
        public void AddCapabilityDoesNotStoreCapabilityWhenHistoryIsEmpty()
        {
            var type = typeof(Person);

            var capability = Substitute.For <IBuildCapability>();

            var sut = new BuildHistory();

            sut.AddCapability(type, capability);

            var actual = sut.GetCapability(type);

            actual.Should().BeNull();
        }
        public void GetCapabilityReturnsStoredCapability()
        {
            var type  = typeof(Address);
            var value = new Person();

            var capability = Substitute.For <IBuildCapability>();

            var sut = new BuildHistory();

            sut.Push(value);
            sut.AddCapability(type, capability);

            var actual = sut.GetCapability(type);

            actual.Should().Be(capability);
        }