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

When_binding_an_object_to_aform_withaliases() private method

private When_binding_an_object_to_aform_withaliases ( ) : void
return void
        public void When_binding_an_object_to_aform_withaliases()
        {
            var binder = new Binder();
            var form = new MySampleForm();
            var aliases = new List<BindaAlias> {new BindaAlias("Location", "PostLocation")};
            var post = NeededObjectsFactory.CreatePost();

            binder.Bind(post, form, aliases);

            Assert.That(form.Title.Text, Is.EqualTo(TestVariables.Title));
            Assert.That(form.Author.Text, Is.EqualTo(TestVariables.Author));
            Assert.That(form.Date.Value, Is.EqualTo(TestVariables.Posted));
            Assert.That(form.Body.Text, Is.EqualTo(TestVariables.Body));
            Assert.That(form.PostLocation.Text,Is.EqualTo(TestVariables.Location));
        }