Clean up enum.txt file before test starts.
MODIFY
src/Chapter09.Tests/Listing09.18.UsingFlagsAttribute.cs
src/Chapter09.Tests/Listing09.18.UsingFlagsAttribute.cs
+using System.IO;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -9,6 +10,10 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter09.Listing09_18.Tests
[TestMethod]
public void Main_FileAttributes_UseFlagsAttribute()
{
+ if (File.Exists("enum.txt"))
+ {
+ File.Delete("enum.txt");
+ }
string expected = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
? @"""ReadOnly | Hidden"" outputs as ""ReadOnly, Hidden""
ReadOnly, Hidden"

Clean up enum.txt file before test starts.