public void Day14_Puzzle2_PolyCounter_OK() { var lines = Utils.ReadLinesFromFile("Day14.txt"); Assert.Equal(102, lines.Length); var sut = new PolymerizerCounter(lines); Assert.Equal("KOKHCCHNKKFHBKVVHNPN", sut.Template); for (int i = 0; i < 40; i++) { sut.PairInsertion(); } long actual = sut.QuantityOfElements(); Assert.Equal(3941782230241, actual); }
public void Day14_TestReadPolymers_PolyCounter_40_OK() { var lines = Utils.ReadLinesFromFile("Day14Test.txt"); Assert.Equal(18, lines.Length); var sut = new PolymerizerCounter(lines); Assert.Equal("NNCB", sut.Template); for (int i = 0; i < 40; i++) { sut.PairInsertion(); } long actual = sut.QuantityOfElements(); Assert.Equal(2188189693529, actual); }