public void test_add_number() { var dist = new Distance(); dist.AddNumber("number", 1, 1); dist.Penalties.Should().BeEquivalentTo(new Dictionary <string, List <double> > { { "number", new List <double> { 0.0 } } }); dist.AddNumber("number", 1, 2); dist.Penalties.Should().BeEquivalentTo(new Dictionary <string, List <double> > { { "number", new List <double> { 0.0, 1.0 } } }); dist.AddNumber("number", 2, 1); dist.Penalties.Should().BeEquivalentTo(new Dictionary <string, List <double> > { { "number", new List <double> { 0.0, 1.0, 1.0 } } }); dist.AddNumber("number", -1, 2); dist.Penalties.Should().BeEquivalentTo(new Dictionary <string, List <double> > { { "number", new List <double> { 0.0, 1.0, 1.0, 1.0, 1.0, 1.0 } } }); }