Beispiel #1
0
        public void value_hit_grandchild()
        {
            theValues["Key1"]        = "a";
            theValues["Key2"]        = "a";
            theValues["Key3"]        = "a";
            theValues["OneKey4"]     = "a4";
            theValues["OneTwoKey11"] = "1211";
            theValues["OneKey5"]     = "a";
            theValues["OneKey6"]     = "a";

            var action     = MockRepository.GenerateMock <Action <string, string> >();
            var grandchild = new PrefixedKeyValues("Two", thePrefixedValues);

            grandchild.ForValue("Key11", action).ShouldBeTrue();

            action.AssertWasCalled(x => x.Invoke("OneTwoKey11", "1211"));
        }
        public void value_hit_grandchild()
        {
            theValues["Key1"] = "a";
            theValues["Key2"] = "a";
            theValues["Key3"] = "a";
            theValues["OneKey4"] = "a4";
            theValues["OneTwoKey11"] = "1211";
            theValues["OneKey5"] = "a";
            theValues["OneKey6"] = "a";

            var action = MockRepository.GenerateMock<Action<string, string>>();
            var grandchild = new PrefixedKeyValues("Two", thePrefixedValues);

            grandchild.ForValue("Key11", action).ShouldBeTrue();

            action.AssertWasCalled(x => x.Invoke("OneTwoKey11", "1211"));
        }
Beispiel #3
0
 public void SetUp()
 {
     theValues         = new KeyValues();
     thePrefixedValues = new PrefixedKeyValues("One", theValues);
 }
 public void SetUp()
 {
     theValues = new KeyValues();
     thePrefixedValues = new PrefixedKeyValues("One", theValues);
 }