Exemplo n.º 1
0
        public void GetConfText_GetsDictOfStrings()
        {
            var subject = new DictedClass();

            subject.DictOfStrings[0] = "hello";
            subject.DictOfStrings[1] = "world";
            var actual   = subject.GetConfText();
            var expected = string.Join(Environment.NewLine,
                                       "DictedClass.DictOfStrings[0] = hello",
                                       "DictedClass.DictOfStrings[1] = world");

            Assert.That(actual, Is.EqualTo(expected));
        }
Exemplo n.º 2
0
        public void GetConfText_CanRoundTripDictOfStrings()
        {
            var subject = new DictedClass();

            subject.DictOfStrings[0] = "hello";
            subject.DictOfStrings[1] = "world";
            var text     = subject.GetConfText();
            var conf     = new ConfBlockFactory().CreateConfBlock(text, new TextContentsProvider());
            var copy     = conf.Configure(new DictedClass());
            var actual   = copy.DictOfStrings;
            var expected = subject.DictOfStrings;

            CollectionAssert.AreEqual(expected, actual);
        }