public void TryResolve_WithAmbiguousBindingSelection_ThrowsAmbiguousExodataBindingsException()
        {
            var symbol = new Symbol();
            var source = new ExodataBindingModule();

            source.Bind(symbol, 42);
            source.Bind(symbol, 42);

            var resolver = new ExodataResolver(new[] { source });

            Maybe <int> result = resolver.TryResolve(ExodataRequest.Create <int, object, object>(symbol, Maybe <object> .NoValue, Maybe <object> .NoValue, null));

            var exception = Assert.Throws <AmbiguousExodataBindingsException>(() => { var x = result.HasValue; });

            Assert.IsNotNull(exception);
            Assert.AreEqual(2, exception.Bindings.Count());
        }
        public void TryResolve_WithNonAmbiguousBindingSelection_YieldsValue()
        {
            var symbol = new Symbol();
            var source = new ExodataBindingModule();

            source.Bind(symbol, 42);

            var resolver = new ExodataResolver(new[] { source });

            Maybe <int> result = resolver.TryResolve(ExodataRequest.Create <int, object, object>(symbol, Maybe <object> .NoValue, Maybe <object> .NoValue, null));

            Assert.AreEqual(42, result.Value);
        }
 public IFluentExodataBindingNamedGivenSubjectWhenTo <TExodata, object, object> Bind <TExodata>(ISymbol symbol)
 {
     return(_ResolverModule.Bind <TExodata>(symbol));
 }