Exemplo n.º 1
0
        public void HaveInnerTable_ModelHaveBusses_TrueReturned(MapBusStop model)
        {
            // Arrange
            var viewModel = new MapBusStopViewModel();

            // Act
            viewModel.Model = model;
            var haveInnerTable = viewModel.HaveInnerTable();

            // Assert
            haveInnerTable.ShouldBeTrue();
        }
Exemplo n.º 2
0
        public void GetColumns_ColumnNamesAreNotEmpty()
        {
            // Arrange
            var viewModel = new MapBusStopViewModel();

            // Act
            var columns = viewModel.GetColumns();

            // Assert
            foreach (var colName in columns)
            {
                colName.Should().NotBeNullOrEmpty();
            }
        }
Exemplo n.º 3
0
        public void GetRow_ModelValuesReturned()
        {
            // Arrange
            var viewModel = new MapBusStopViewModel();

            // Act
            viewModel.Model = ViewModelTestData.MapBusStop;
            var rowValues = viewModel.GetRow();

            // Assert
            rowValues[0].Should().Be(viewModel.Model.Id.ToString());
            rowValues[1].Should().Be(viewModel.Model.LongName);
            rowValues[2].Should().Be(viewModel.Model.ShortName);
            rowValues[3].Should().Be(viewModel.Model.Longitude.ToString());
            rowValues[4].Should().Be(viewModel.Model.Latitude.ToString());
            rowValues[5].Should().Be(viewModel.Model.Buses.Keys.Count.ToString());
        }