public void OutputFileFormat_Throws_WhenInvalidFormat_OtherwiseSetsOutputFileFormat(string testValue, Type expectedExceptionTypeIfAny = null)
        {
            var baker = new AtlasBaker();

            if (expectedExceptionTypeIfAny != null)
            {
                Assert.Throws(expectedExceptionTypeIfAny, () => { baker.OutputFilenameFormat = testValue; });
            }
            else
            {
                baker.OutputFilenameFormat = testValue;
                Assert.AreEqual(testValue, baker.OutputFilenameFormat);
            }
        }
        public void PixelFormat_ThrowsArgumentOutOfRangeException_WhenOutOfRange_OtherwiseSetsPixelFormat(PixelFormat testValue, bool expectException)
        {
            var baker = new AtlasBaker();

            if (expectException)
            {
                Assert.Throws <ArgumentOutOfRangeException>(() => { baker.PixelFormat = testValue; });
            }
            else
            {
                baker.PixelFormat = testValue;
                Assert.AreEqual(testValue, baker.PixelFormat);
            }
        }
        public void Resolution_ThrowsArgumentOutOfRangeException_WhenOutOfRange_OtherwiseSetsResolution(int testValue, bool expectException)
        {
            var baker = new AtlasBaker();

            if (expectException)
            {
                Assert.Throws <ArgumentOutOfRangeException>(() => { baker.Resolution = testValue; });
            }
            else
            {
                baker.Resolution = testValue;
                Assert.AreEqual(testValue, baker.Resolution);
            }
        }
        public void ChannelIdentifiers_Throws_WhenInvalid_OtherwiseSetsChannelIdentifiers(string[] testValue, Type expectedExceptionTypeIfAny)
        {
            var baker = new AtlasBaker();

            if (expectedExceptionTypeIfAny != null)
            {
                Assert.Throws(expectedExceptionTypeIfAny, () => { baker.ChannelIdentifiers = testValue; });
            }
            else
            {
                baker.ChannelIdentifiers = testValue;
                Assert.AreEqual(testValue, baker.ChannelIdentifiers);
            }
        }
        public MainWindow()
        {
            InitializeComponent();
            _isInitialized = true;

            _txtHorizontal.Text = _baker.LayoutWidth.ToString();
            _txtVertical.Text   = _baker.LayoutHeight.ToString();

            foreach (var pixelFormat in AtlasBaker.GetPixelFormats())
            {
                _cboPixelFormat.Items.Add(pixelFormat);
            }
            _cboPixelFormat.SelectedItem = _baker.PixelFormatString;

            RecreateFileGrid();
        }
        public void LayoutWidth_LayoutHeight_ThrowsArgumentOutOfRangeException_WhenOutOfRange_OtherwiseSetsLayoutWidth(int testValue, bool expectException)
        {
            var baker = new AtlasBaker();

            if (expectException)
            {
                Assert.Throws <ArgumentOutOfRangeException>(() => { baker.LayoutWidth = testValue; });
                Assert.Throws <ArgumentOutOfRangeException>(() => { baker.LayoutHeight = testValue; });
            }
            else
            {
                baker.LayoutWidth  = testValue;
                baker.LayoutHeight = testValue;
                Assert.AreEqual(testValue, baker.LayoutWidth);
                Assert.AreEqual(testValue, baker.LayoutHeight);
            }
        }