Exemplo n.º 1
0
        public void Find_ReturnsTrailInDataBase_Trail()
        {
            Trail testTrail = new Trail("TrailName1", 1, 2.5f, 3, true, true, true, true, true, true);

            testTrail.Save();
            Trail foundTrail = Trail.Find(testTrail.GetId());

            Assert.AreEqual(testTrail, foundTrail);
        }
Exemplo n.º 2
0
        public void Save_DatabaseAssignsIdToTrail_Id()
        {
            Trail testTrail = new Trail("TrailName1", 1, 2.5f, 3, true, true, true, true, true, true);

            testTrail.Save();
            Trail savedTrail = Trail.GetAll()[0];
            int   result     = savedTrail.GetId();
            int   testId     = testTrail.GetId();

            Assert.AreEqual(testId, result);
        }