public void TestBadGeneric() { UserAgentAnnotationAnalyzer <object> userAgentAnalyzer = new UserAgentAnnotationAnalyzer <object>(); Action a = new Action(() => userAgentAnalyzer.Map("Foo")); a.Should().Throw <InvalidParserConfigurationException>().WithMessage("[Map] The mapper instance is null."); }
public void TestNullInit() { UserAgentAnnotationAnalyzer <string> userAgentAnalyzer = new UserAgentAnnotationAnalyzer <string>(); userAgentAnalyzer.Map(null).Should().BeNull(); }
public IUserAgentModel Enrich(string userAgent) { var model = new UserAgentModel(userAgent); return(userAgentAnalyzer.Map(model)); }
/// <summary> /// The Enrich /// </summary> /// <param name="record">The record<see cref="TestRecord"/></param> /// <returns>The <see cref="TestRecord"/></returns> public TestRecord Enrich(TestRecord record) { return(userAgentAnalyzer.Map(record)); }
public PrivateTestRecord Enrich(PrivateTestRecord record) { return(userAgentAnalyzer.Map(record)); }