BindaTests.Tests.BindingObjectToFormTests.When_binding_an_object_to_aform_using_prefixes_withaliases C# (CSharp) Method

When_binding_an_object_to_aform_using_prefixes_withaliases() private method

        public void When_binding_an_object_to_aform_using_prefixes_withaliases()
        {
            var binder = new Binder();
            binder.AddControlPrefix(new HungarianNotationControlPrefix());
            var form = new MySamplePrefixForm();
            var aliases = new List<BindaAlias> {new BindaAlias("Location", "PostLocation")};
            var post = NeededObjectsFactory.CreatePost();

            binder.Bind(post, form, aliases);

            Assert.That(form.txtTitle.Text, Is.EqualTo(TestVariables.Title));
            Assert.That(form.txtAuthor.Text, Is.EqualTo(TestVariables.Author));
            Assert.That(form.dpDate.Value, Is.EqualTo(TestVariables.Posted));
            Assert.That(form.txtBody.Text, Is.EqualTo(TestVariables.Body));
            Assert.That(form.txtPostLocation.Text, Is.EqualTo(TestVariables.Location));
        }