Exemplo n.º 1
0
        public void RunTest_ShouldThrowExceptionIfSetupIsNotProperlySpecified(string args)
        {
            // Arrange
            var game = new GameOfLifeEngine(new Strings(), _file);
            // Act
            TestDelegate act = () => game.Run(args.Split(','));

            // Asset
            Assert.Throws <ArgumentException>(act);
        }
Exemplo n.º 2
0
        public void RunTest_ShouldThrowExceptionIfSetupIsNotSpecified1()
        {
            // Arrange
            var game = new GameOfLifeEngine(new Strings(), _file);
            // Act
            TestDelegate act = () => game.Run(null);

            // Asset
            Assert.Throws <ArgumentNullException>(act);
        }
Exemplo n.º 3
0
        public void RunTest_LoadsTheFile()
        {
            // Arrange
            var fileName = "setup2.txt";
            var game     = new GameOfLifeEngine(new Strings(), _file);
            // Act
            var result = game.Run(new string[] { fileName }).Status;

            // Asset
            Assert.AreEqual(fileName, result.FileName);
        }