public void Resolve_Parser_Not_Found() { // arrange var resolver = new ResultParserResolver(new[] { new DummyResultParser() }); // act Action action = () => resolver.GetResultParser(typeof(int)); // assert Assert.Throws <ArgumentException>(action); }
public void Resolve_Type_Is_Null() { // arrange var resolver = new ResultParserResolver(new[] { new DummyResultParser() }); // act Action action = () => resolver.GetResultParser(null); // assert Assert.Throws <ArgumentNullException>(action); }
public void Resolve_Parser() { // arrange var resolver = new ResultParserResolver(new[] { new DummyResultParser() }); // act IResultParser parser = resolver.GetResultParser(typeof(string)); // assert Assert.NotNull(parser); Assert.IsType <DummyResultParser>(parser); }