コード例 #1
0
            public void BeInitializeByDefault_WhenCalledWithEmptyParameters()
            {
                // Arrange
                SUT.CustomUpdateEngine.Arguments args = new SUT.CustomUpdateEngine.Arguments();

                // Act
                args = SUT.CustomUpdateEngine.GetArguments(new string[] { "", "" });

                // Assert
                Assert.AreEqual(Environment.ExpandEnvironmentVariables("%Temp%"), args.DebugFilePath);
                Assert.AreEqual(String.Empty, args.ActionFilePath);
            }
コード例 #2
0
            public void BeProperlyIniialized_WhenCalledWithValidParameters()
            {
                // Arrange
                SUT.CustomUpdateEngine.Arguments args = new SUT.CustomUpdateEngine.Arguments();
                string expectedActionFile             = "Action1";
                string expectedDebugFilePath          = @"C:\Users\Courtel\AppData\Local\Temp\WPP";

                // Act
                args = SUT.CustomUpdateEngine.GetArguments(new string[] { @"/actionfile=" + expectedActionFile, @"/debugfilefolder=" + expectedDebugFilePath });

                // Assert
                Assert.AreEqual(expectedDebugFilePath, args.DebugFilePath);
                Assert.AreEqual(expectedActionFile, args.ActionFilePath);
            }