Exemplo n.º 1
0
            // ACT
            public override void Act(out object[] actual)
            {
                // Read, Update & Write PrivateProfile
                using (var profile = new PrivateProfile(this.FilePath, false))
                {
                    // Print Profile
                    Console.WriteLine();
                    Console.WriteLine("Before Change:");
                    PrivateProfileTests.PrintProfile(profile);

                    // ACT (1): Change Profile
                    this.ChangeProfile(profile);

                    // Print Profile
                    Console.WriteLine();
                    Console.WriteLine("After Change:");
                    PrivateProfileTests.PrintProfile(profile);

                    // ACT (2): Write to File
                    profile.Write();
                }

                // Re-Read PrivateProfile
                using (var profile = new PrivateProfile(this.FilePath))
                {
                    // Print Profile
                    Console.WriteLine();
                    Console.WriteLine("Re-Read Profile:");
                    PrivateProfileTests.PrintProfile(profile);

                    // SET Actual
                    actual = PrivateProfileTestParameter.ConvertProfileToObjectArray(profile);
                }
            }
Exemplo n.º 2
0
            // ACT
            public override void Act(out object[] actual)
            {
                // NEW PrivateProfile from INI file
                var profile = new PrivateProfile(this.FilePath);

                // Print Profile
                Console.WriteLine();
                Console.WriteLine("Print Profile:");
                PrivateProfileTests.PrintProfile(profile);

                // GET Actual
                actual = PrivateProfileTestParameter.ConvertProfileToObjectArray(profile);
            }
Exemplo n.º 3
0
            // ACT
            public override void Act(out string actual)
            {
                // NEW PrivateProfile
                var profile = new PrivateProfile();

                // ACT: Import content
                profile.Import(this.RawLines);

                // Print Profile
                Console.WriteLine();
                Console.WriteLine("Print Profile:");
                PrivateProfileTests.PrintProfile(profile);

                // GET Actual
                actual = profile.Export();
            }