public void It_handles_timespans() { IValueRetriever retriever = new TimeSpanValueRetriever(); var empty = new System.Collections.Generic.KeyValuePair <string, string>(); retriever.CanRetrieve(empty, null, typeof(System.TimeSpan)).Should().BeTrue(); retriever.CanRetrieve(empty, null, typeof(System.String)).Should().BeFalse(); retriever.CanRetrieve(empty, null, typeof(System.Boolean)).Should().BeFalse(); }
public void CanRetrieve(Type type, bool expectation) { var retriever = new TimeSpanValueRetriever(); var result = retriever.CanRetrieve(new KeyValuePair <string, string>(IrrelevantKey, IrrelevantKey), IrrelevantType, type); result.Should().Be(expectation); }