public void Should_count_how_many_bags_can_hold_gold_ones() { var inputReader = new InputReaders(); var path = @"C:\Users\emollett\Documents\sites\AdventOfCode2020\AdventOfCode2020\Inputs\07_HandyHaversacks_Test.txt"; var input = inputReader.readLines(path); var handyHaversacks = new HandyHaversacks(); var bags = handyHaversacks.getAllTheBags(input); var numberOfGoldBags = handyHaversacks.containsBagToFind(bags, "shiny gold"); Assert.Equal(4, numberOfGoldBags.Count); }
public void Should_read_the_input_to_a_list_of_bags() { var inputReader = new InputReaders(); var path = @"C:\Users\emollett\Documents\sites\AdventOfCode2020\AdventOfCode2020\Inputs\07_HandyHaversacks_Test.txt"; var input = inputReader.readLines(path); var handyHaversacks = new HandyHaversacks(); var bags = handyHaversacks.getAllTheBags(input); Assert.Equal(9, bags.Count); Assert.Equal("light red", bags[0].description); }