Exemple #1
0
        public void Build_descriptor_extra_params_set_to_null_should_acts_as_empty()
        {
            //Given, When
            var param1 = new BuildDescriptorParams("foo", "fizz", "buzz", false, null);
            var param2 = new BuildDescriptorParams("foo", "fizz", "buzz", false, new Dictionary <string, object>());

            //Then
            param1.ShouldEqual(param2);
        }
        public void build_descriptor_params_should_act_as_a_unique_key()
        {
            var param1 = new BuildDescriptorParams("foo", "bar", "fizz", "buzz", false, null);
            var param2 = new BuildDescriptorParams("foo", "bar", "fizz", "buzz", false, null);
            var param3 = new BuildDescriptorParams("foo", "bar", "fizz", "buzz", true, null);
            var param4 = new BuildDescriptorParams("foo", "baz", "fizz", "buzz", false, null);

            param1.ShouldEqual(param2);
            param1.ShouldNotEqual(param3);
            param1.ShouldNotEqual(param4);
        }
Exemple #3
0
        public void build_descriptor_params_should_act_as_a_unique_key()
        {
            var param1 = new BuildDescriptorParams("foo", "bar", "fizz", "buzz", false, null);
            var param2 = new BuildDescriptorParams("foo", "bar", "fizz", "buzz", false, null);
            var param3 = new BuildDescriptorParams("foo", "bar", "fizz", "buzz", true, null);
            var param4 = new BuildDescriptorParams("foo", "baz", "fizz", "buzz", false, null);

            param1.ShouldEqual(param2);
            param1.ShouldNotEqual(param3);
            param1.ShouldNotEqual(param4);
        }
Exemple #4
0
        public void Build_descriptor_extra_params_should_have_identical_equality()
        {
            //Given, When
            var param1 = new BuildDescriptorParams("foo", "fizz", "buzz", false, Dict(new[] { "hippo", "lion" }));
            var param2 = new BuildDescriptorParams("foo", "fizz", "buzz", false, Dict(new[] { "hippo" }));
            var param3 = new BuildDescriptorParams("foo", "fizz", "buzz", false, Dict(new[] { "lion" }));
            var param4 = new BuildDescriptorParams("foo", "fizz", "buzz", false, Dict(new[] { "lion", "hippo" }));
            var param5 = new BuildDescriptorParams("foo", "fizz", "buzz", false, Dict(null));
            var param6 = new BuildDescriptorParams("foo", "fizz", "buzz", false, Dict(new string[0]));
            var param7 = new BuildDescriptorParams("foo", "fizz", "buzz", false, Dict(new[] { "hippo", "lion" }));

            //Then
            param1.ShouldNotEqual(param2);
            param1.ShouldNotEqual(param3);
            param1.ShouldNotEqual(param4);
            param1.ShouldNotEqual(param5);
            param1.ShouldNotEqual(param6);
            param1.ShouldEqual(param7);
        }