public void MaphawksContext_Default_Should_Pass()
        {
            // Arrange

            // Act
            var result = new MaphawksContext();

            // Assert
            Assert.IsNotNull(result);
        }
Esempio n. 2
0
        public void AllTablesViewModel_Constructor_With_Context_Parameter_Should_Pass()
        {
            // Arrange
            MaphawksContext context = new MaphawksContext();

            // Act
            var result = new AllTablesViewModel();

            // Assert
            Assert.IsNotNull(result);
            Assert.IsNotNull(result.locations);
        }
        public void MaphawksContext_Get_Property_Defaults_Should_Pass()
        {
            // Arrange
            var result = new MaphawksContext();

            // Act

            // Assert
            Assert.IsNotNull(result.Contacts);
            Assert.IsNotNull(result.DailyHours);
            Assert.IsNotNull(result.Locations);
            Assert.IsNotNull(result.SpecialQualities);
        }
        public LocationsController(MaphawksContext context, LocationsBackend backend = null)
        {
            _context = context;

            // Fork to allow for mocking out backend
            if (backend != null)
            {
                this.backend = backend;
            }
            else
            {
                this.backend = new LocationsBackend(_context);
            }
        }
Esempio n. 5
0
        //private int TakeSize;
        //private int TakeIndex;
        //private PositionModel point;

        public LocationsBackend(MaphawksContext context)
        {
            db = new DatabaseHelper(context);
        }
 /// <summary>
 /// Constructor used for real deployment of app
 /// </summary>
 /// <param name="context"></param>
 public DatabaseHelper(MaphawksContext context)
 {
     this.context = context;
 }