public void Should_Find_Fastlane_Deliver_Runner_If_Tool_Path_Not_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("/Working/tools/fastlane", result.Path.FullPath);
            }
            public void Should_Add_Action_If_No_Configuration_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("deliver", result.Args);
            }
            public void Should_Set_Working_Directory()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("/Working", result.Process.WorkingDirectory.FullPath);
            }
            public void Should_Add_App_Icon_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.AppIcon = new FilePath("./cakeicon.png");

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -l \"/Working/{fixture.Settings.AppIcon}\"", result.Args);
            }
            public void Should_Throw_If_Settings_Is_Null()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings = null;

                // When
                var result = Record.Exception(() => fixture.Run());

                // Then
                Assert.IsType <ArgumentNullException>(result);
            }
            public void Should_Add_Team_Name_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.TeamName = "NY Mets";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -e {fixture.Settings.TeamName}", result.Args);
            }
            public void Should_Add_Support_Url_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.SupportUrl = "http://cake.fastlane.com/support";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver --support_url {fixture.Settings.SupportUrl}", result.Args);
            }
            public void Should_Add_Skip_Screen_Shots_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.SkipScreenShots = true;

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("deliver --skip_screenshots", result.Args);
            }
            public void Should_Add_App_Rating_Config_Path_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.AppRatingConfigPath = new FilePath("./config");

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -g \"/Working/{fixture.Settings.AppRatingConfigPath}\"", result.Args);
            }
            public void Should_Add_Metadata_Path_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.MetaDataPath = "./metadata";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -m \"/Working/{fixture.Settings.MetaDataPath}\"", result.Args);
            }
            public void Should_Add_Itc_Provider_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.ItcProvider = "Itc Provider Name";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver --itc_provider {fixture.Settings.ItcProvider}", result.Args);
            }
            public void Should_Add_Force_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.Force = true;

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("deliver -f", result.Args);
            }
            public void Should_Add_Dev_Portal_Team_Name_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.DevPortalTeamName = "Cake Contrib";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -y {fixture.Settings.DevPortalTeamName}", result.Args);
            }
            public void Should_Add_Copyright_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.Copyright = "Cake Copyright";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver --copyright {fixture.Settings.Copyright}", result.Args);
            }
            public void Should_Add_Build_Number_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.BuildNumber = "1.3.1.10004";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -n {fixture.Settings.BuildNumber}", result.Args);
            }
            public void Should_Add_Secondary_Second_Sub_Category_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.SecondarySecondSubCategory = "Secondary Second Sub Category";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver --secondary_second_sub_category {fixture.Settings.SecondarySecondSubCategory}", result.Args);
            }
            public void Should_Add_Skip_Binary_Upload_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.SkipBinaryUpload = true;

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("deliver --skip_binary_upload", result.Args);
            }
            public void Should_Add_Phased_Release_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.PhasedRelease = true;

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("deliver --phased_release", result.Args);
            }
            public void Should_Add_Skip_Metadata_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.SkipMetadataUpload = true;

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("deliver --skip_metadata", result.Args);
            }
            public void Should_Add_Pkg_Path_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.PkgPath = new FilePath("./cake.pkg");

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -c \"/Working/{fixture.Settings.PkgPath}\"", result.Args);
            }
            public void Should_Add_Submit_For_Review_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.SubmitForReview = true;

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("deliver --submit_for_review", result.Args);
            }
            public void Should_Add_Platform_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.Platform = "MacOS";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -j {fixture.Settings.Platform}", result.Args);
            }
            public void Should_Add_Team_Id_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.TeamId = "456";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -k {fixture.Settings.TeamId}", result.Args);
            }
            public void Should_Add_Price_Tier_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.PriceTier = 1;

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -r {fixture.Settings.PriceTier}", result.Args);
            }
            public void Should_Add_User_Name_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.UserName = "******";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -u {fixture.Settings.UserName}", result.Args);
            }
            public void Should_Add_App_Identifier_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.AppIdentifier = "com.fastlane.cake.local";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -a {fixture.Settings.AppIdentifier}", result.Args);
            }
            public void Should_Add_Primary_First_Sub_Category_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.PrimaryFirstSubCategory = "Primary First Sub Category";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver --primary_first_sub_category {fixture.Settings.PrimaryFirstSubCategory}", result.Args);
            }
            public void Should_Add_Screen_Shots_Path_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.ScreenShotPath = new DirectoryPath("./screenshots");

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -w \"/Working/{fixture.Settings.ScreenShotPath}\"", result.Args);
            }
            public void Should_Add_App_Version_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.AppVersion = "1.0.1";

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver -z {fixture.Settings.AppVersion}", result.Args);
            }
            public void Should_Add_Auto_Release_Date_If_Provided()
            {
                // Given
                var fixture = new FastlaneDeliverProviderFixture();

                fixture.Settings.AutomaticReleaseDate = DateTimeOffset.Now;

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal($"deliver --auto_release_date {fixture.Settings.AutomaticReleaseDate.Value.Millisecond}", result.Args);
            }