public void EmptyMatchDisposition_ReportsCorrectly() { ITemplateInfo templateInfo = new TemplateInfo(); ITemplateMatchInfo TemplateMatchInfo = new TemplateMatchInfo(templateInfo); Assert.False(TemplateMatchInfo.IsMatch); Assert.False(TemplateMatchInfo.IsMatchExceptContext()); Assert.False(TemplateMatchInfo.IsPartialMatch); Assert.False(TemplateMatchInfo.IsPartialMatchExceptContext()); Assert.False(TemplateMatchInfo.IsInvokableMatch()); Assert.False(TemplateMatchInfo.HasAmbiguousParameterValueMatch()); Assert.False(TemplateMatchInfo.HasParameterMismatch()); Assert.False(TemplateMatchInfo.HasParseError()); Assert.Equal(0, TemplateMatchInfo.GetInvalidParameterNames().Count); Assert.Equal(0, TemplateMatchInfo.GetValidTemplateParameters().Count); }
public void ContextMatch_ReportsCorrectly() { ITemplateInfo templateInfo = new TemplateInfo(); ITemplateMatchInfo TemplateMatchInfo = new TemplateMatchInfo(templateInfo); TemplateMatchInfo.AddDisposition(new MatchInfo { Location = MatchLocation.Context, Kind = MatchKind.Exact }); Assert.True(TemplateMatchInfo.IsMatch); Assert.False(TemplateMatchInfo.IsMatchExceptContext()); Assert.True(TemplateMatchInfo.IsPartialMatch); Assert.False(TemplateMatchInfo.IsPartialMatchExceptContext()); Assert.True(TemplateMatchInfo.IsInvokableMatch()); Assert.False(TemplateMatchInfo.HasAmbiguousParameterValueMatch()); Assert.False(TemplateMatchInfo.HasParameterMismatch()); Assert.False(TemplateMatchInfo.HasParseError()); }