This is an actual test in my code:

[TestMethod]
        public void custItemView()
        {
            String item = "351000287";
            String VenItem = EFData.GetCustomerPartFromView(item);
            Assert.IsTrue(VenItem.Length > 0);
        }

My function has a view of all items in our cross-reference tables. Is that
found and what is their item number for it.  I assert that it will be
found, and to verify it was, the length of the string has to have some
data.



On Fri, Jul 24, 2020 at 8:20 AM Alan Bourke <alanpbou...@fastmail.fm> wrote:

> > I still have trouble conceptualizing how to write unit tests for data
> > access.
>
> That's an integration test, really, not a unit test.
>
> What I do is set up data sets  of VFP tables or SQL Server and then
> zip\unzip the one that applies to the test, as part of the test.
>
> --
>   Alan Bourke
>   alanpbourke (at) fastmail (dot) fm
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/cajidmyjcm0yhwajwj1qod8gfy8soucf663npkzrdhf20rct...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to