public void GetJsonResultByRightLocidTests()
        {
            // Arrange
            ShelfController controller = new ShelfController();
            // Act
            JsonResult result = controller.GenCopyNumber(49) as JsonResult;

            // Assert
            Assert.IsNotNull(result);
        }
        public void GetJsonResultByWrongLocidTests()
        {
            // Arrange
            ShelfController controller = new ShelfController();
            // Act
            JsonResult result = controller.GenCopyNumber(-10) as JsonResult;

            // Assert
            Assert.AreEqual(result.Data.ToString(), "");
        }
示例#3
0
        public ShelfView(String domain_name, ResourceData resource)
        {
            // Create the controller
            controller = new ShelfController(domain_name, resource);

            ShelfViewInit();

            // set Window parameters
            this.Text                        = domain_name + " Shelf";
            this.shelftitle.Text             = domain_name;
            this.sort_combo_box.SelectedItem = "rating";
            ActivateListMode();

            // Handlers for internal events
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(OnFormClosing);
        }