Exemple #1
0
        public void Parse_should_throw_on_invalid_text(string text)
        {
            var ex = Record.Exception(() => TestTag.Parse(text));

            Expect(ex).Not.ToBe.Null();
            Expect(ex).ToSatisfy.Any(
                Matchers.BeInstanceOf(typeof(FormatException)),
                Matchers.BeInstanceOf(typeof(ArgumentException))
                );
        }
        public void GetData_will_get_TestData_with_correct_tags()
        {
            var data = GetData(() => new FixtureDataAttribute("data:hello:world")
            {
                Tag  = "platform:windows",
                Tags = new [] { "slow" }
            });

            Assert.Equal(new [] { TestTag.Parse("platform:windows"), TestTag.Slow }, data[0].Tags);
        }
Exemple #3
0
 public void Parse_should_extract_Value_from_string(string text)
 {
     Assert.Equal("value", TestTag.Parse(text).Value);
 }
Exemple #4
0
 public void Parse_should_extract_Type_from_string(string text)
 {
     Assert.Equal("name", TestTag.Parse(text).Type);
 }
Exemple #5
0
 public void Contains_test_tag_match()
 {
     Assert.Contains(TestTag.Parse("hello:world"), new TestTagCollection {
         { "hello:world" }
     });
 }