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); }
public void Parse_should_extract_Value_from_string(string text) { Assert.Equal("value", TestTag.Parse(text).Value); }
public void Parse_should_extract_Type_from_string(string text) { Assert.Equal("name", TestTag.Parse(text).Type); }
public void Contains_test_tag_match() { Assert.Contains(TestTag.Parse("hello:world"), new TestTagCollection { { "hello:world" } }); }