public void GetCapabilityReturnsNullWhenBuildHistoryIsEmpty() { var type = typeof(Address); var sut = new BuildHistory(); var actual = sut.GetCapability(type); actual.Should().BeNull(); }
public void GetCapabilityReturnsNullWhenNoCapabilityStoredForType() { var type = typeof(Address); var value = new Person(); var sut = new BuildHistory(); sut.Push(value); var actual = sut.GetCapability(type); actual.Should().BeNull(); }
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); }