public void ShouldFindNextAdapterWhichCanConnect(int output, int expectedAdapter) { // Arrange var adapters = AdaptersInBag(); // Act var rating = new AdapterBag(adapters).FindNextAdapter(output); // Assert rating.Should().Be(expectedAdapter); }
public void ShouldGetBuiltInAdapterRating() { // Arrange var adapters = AdaptersInBag(); // Act var rating = new AdapterBag(adapters).GetBuiltInAdapterRate(); // Assert rating.Should().Be(22); }
public void ShouldFindAdapterWhichCanConnectWith3JoltDifference() { // Arrange var adapters = new List <int> { 16, 3, 15 }; // Act var rating = new AdapterBag(adapters).FindFirstMatchingAdapter(0); // Assert rating.Should().Be(3); }
public void ShouldFindAdapterWhichCanConnectDirectly() { // Arrange var adapters = new List <int> { 16, 1, 15, 0 }; // Act var rating = new AdapterBag(adapters).FindFirstMatchingAdapter(0); // Assert rating.Should().Be(0); }