コード例 #1
0
        public void Should_Get_Hotspot_By_Id()
        {
            //Arrange
            var hotspot = new HotSpotService();
            //Act
            var sut = hotspot.GetById(100);

            //Assert
            sut.Number.Should().Be(100);
        }
コード例 #2
0
        public void Should_Update_Old_Data_In_Hotspot()
        {
            //Arrange
            var hotspotService = new HotSpotService();
            var allHotSpots    = hotspotService.GetAll();
            var updatedHotSpot = new HotSpotModel()
            {
                LocationName = "testing",
                LatitudeX    = "111",
                LongitudeY   = "222",
                //Number pop and FakeId prop are not taking care into consideration for the update purpose
                //Therefore it's values will be the same as used to be
                Number = 1,
                fakeID = "LOK001"
            };
            var currentHotSpot = hotspotService.GetById(1);

            //Act
            hotspotService.Update(1, updatedHotSpot);
            //Assert
            currentHotSpot.Should().BeEquivalentTo(updatedHotSpot);
        }