public void AddSail()
        {
            // Arrange
            int expected = _context.Sails.Count() + 1;
            var sail = new Sail() { Size = 4.7, Model = new SailModel() { Name = "Dummy", Manufacturer = _context.Manufacturers.Single(m => m.Name == "Tushingham") } };
            var sut = new EquipmentRepository(_context, _stubLogger);

            // Act
            sut.AddSail(sail);
            _context.Save();

            // Assert
            Assert.AreEqual(expected, _context.Sails.Count(), "Sails count incorrect");
        }
        public void AddBoard()
        {
            // Arrange
            int expected = _context.Boards.Count() + 1;
            var board = new Board() { Model = new BoardModel() { Manufacturer = _context.Manufacturers.Single(m => m.Name == "JP"), Name = "Dummy" }, Volume = 74 };
            var sut = new EquipmentRepository(_context, _stubLogger);

            // Act
            sut.AddBoard(board);
            _context.Save();

            // Assert
            Assert.AreEqual(expected, _context.Boards.Count(), "Boards count incorrect");
        }
        public void AddSail()
        {
            // Arrange
            var stubSails = new InMemoryDbSet<Sail>();
            var sail = new Sail() { Model = new SailModel { Name = "Dummy" }, Size = 4.7 };
            stubEntities.Sails = stubSails;

            // Act
            var sut = new EquipmentRepository(stubEntities, stubLogger);
            sut.AddSail(sail);

            // Assert
            Assert.AreEqual(1, stubSails.Count(), "Sails count incorrect");
        }
        public void AddManufacturer()
        {
            // Arrange
            var stubManufacturers = new InMemoryDbSet<Manufacturer>();
            var manufacturer = new Manufacturer() { Name = "Dummy" };
            stubEntities.Manufacturers = stubManufacturers;

            // Act
            var sut = new EquipmentRepository(stubEntities, stubLogger);
            sut.AddManufacturer(manufacturer);

            // Assert
            Assert.AreEqual(1, stubManufacturers.Count(), "Manufacturers count incorrect");
        }
        public void AddBoard()
        {
            // Arrange
            var stubBoards = new InMemoryDbSet<Board>();
            var board = new Board() { Model = new BoardModel { Name = "Dummy" }, Volume = 1 };
            stubEntities.Boards = stubBoards;

            // Act
            var sut = new EquipmentRepository(stubEntities, stubLogger);
            sut.AddBoard(board);

            // Assert
            Assert.AreEqual(1, stubBoards.Count(), "Boards count incorrect");
        }
        public void AddManufacturer()
        {
            // Arrange
            int expected = _context.Manufacturers.Count() + 1;
            var manufacturer = new Manufacturer() { Name = "Dummy" };
            var sut = new EquipmentRepository(_context, _stubLogger);

            // Act
            sut.AddManufacturer(manufacturer);
            _context.Save();
            int actual = _context.Manufacturers.Count();

            // Assert
            Assert.AreEqual(expected, actual, "Manufacturers count incorrect");
        }