Beispiel #1
0
        public void GetMethod_should_return_null_when_method_not_found()
        {
            var sut    = new TypesCache();
            var result = sut.GetMethod(typeof(TypesCacheTests), "foo");

            result.Should().BeNull();
        }
Beispiel #2
0
        public void GetMethod_should_return_method_when_name_valid()
        {
            var type           = typeof(TypesCacheTests);
            var methodName     = nameof(TypesCacheTests.GetMethod_should_return_method_when_name_valid);
            var expectedMethod = type.GetMethod(methodName);

            var sut    = new TypesCache();
            var result = sut.GetMethod(type, methodName);

            result.Should().BeSameAs(expectedMethod);
        }