summaryrefslogtreecommitdiff
path: root/spec/unit/utility/ConfigurationExtensionsSpecs.cs
blob: 053d662629896084c2e3036f4472fdc7a86013b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Data;
using gorilla.utility;
using Machine.Specifications;

namespace specs.unit.utility
{
    public class ConfigurationExtensionsSpecs
    {
        public class when_configuring_an_item
        {
            It should_return_the_item_that_was_configured_when_completed = () => result.should_be_equal_to(item);

            Establish context = () =>
            {
                configuration = Create.an<Configuration<IDbCommand>>();
                item = Create.an<IDbCommand>();
            };

            Because of = () =>
            {
                result = item.and_configure_with(configuration);
            };

            static Configuration<IDbCommand> configuration;
            static IDbCommand item;
            static IDbCommand result;
        }
    }
}