Esempio n. 1
0
        public async Task FetchLookup_GivenId_ObjectIsRetrieved(string objectType, string id, string name)
        {
            using (var database = new DatabaseWrapper())
            {
                var helper = new ModelHelper(database.Model);

                var dataAccess = new CommonDataAccess(database.WeeeContext);

                if (objectType == "LocalArea")
                {
                    var result = await dataAccess.FetchLookup <LocalArea>(Guid.Parse(id));

                    result.Name.Should().Be(name);
                }
                else if (objectType == "PanArea")
                {
                    var result = await dataAccess.FetchLookup <PanArea>(Guid.Parse(id));

                    result.Name.Should().Be(name);
                }
            }
        }