예제 #1
0
            public void Must_parse_correctly(object[] parameters)
            {
                var headerValue = (string)parameters[0];
                var products    = new List <Tuple <string, string> >();

                for (int i = 1; i < parameters.Length; i += 2)
                {
                    products.Add(new Tuple <string, string>((string)parameters[i], (string)parameters[i + 1]));
                }

                IEnumerable <UpgradeHeader> headers = UpgradeHeader.ParseMany(headerValue);

                Assert.That((headers.Select(arg => new Tuple <string, string>(arg.Product, arg.ProductVersion))), Is.EquivalentTo(products));
            }
예제 #2
0
 public void Must_not_result_in_header(string headerValue)
 {
     Assert.That(UpgradeHeader.ParseMany(headerValue), Is.Empty);
 }