public void TryParse_NotQualifiedString_SingleValueSet()
        {
            var subject = Qualified.TryParse("not qualified");

            Assert.That(subject.Value, Is.EqualTo("not qualified"));
            Assert.That(subject.Quality, Is.EqualTo(Quality.Default));
        }
        public void TryParse_MultiValueDefaultQuality_MultiValueSet()
        {
            var subject = Qualified.TryParse("text/html;level=1");

            Assert.That(subject.Value, Is.EqualTo("text/html;level=1"));
            Assert.That(subject.Quality, Is.EqualTo(Quality.Default));
        }
        public void TryParse_SingleValue_SingleValueSet()
        {
            var subject = Qualified.TryParse("gzip;q=0.5");

            Assert.That(subject.Value, Is.EqualTo("gzip"));
            Assert.That(subject.Quality, Is.EqualTo(new Quality(.5f)));
        }
        public void TryParse_MultiValue_MultiValueSet()
        {
            var subject = Qualified.TryParse("text/html;level=1;q=0.5");

            Assert.That(subject.Value, Is.EqualTo("text/html;level=1"));
            Assert.That(subject.Quality, Is.EqualTo(new Quality(.5f)));
        }
 public void TryParse_Empty_Null(string empty)
 {
     Assert.That(Qualified.TryParse(empty), Is.Null);
 }