public void ADL_Debug_RemoveAllPrefixes_Test() { ADLLogger logger = new ADLLogger("UnitTest"); BitMask bm = new BitMask(2 | 8); logger.AddPrefixForMask(bm, "HELLO"); logger.RemoveAllPrefixes(); Assert.True(logger.GetAllPrefixes().Count == 0); }
public void ADL_Debug_RemoveAllPrefixes_Test() { ADLLogger logger = new ADLLogger(InternalADLProjectDebugConfig.Settings, "UnitTest"); BitMask bm = new BitMask(2 | 8); logger.AddPrefixForMask(bm, "HELLO"); logger.RemoveAllPrefixes(); Assert.True(logger.GetAllPrefixes().Count == 0); }
public void ADL_Debug_GetAllPrefixes_Test() { ADLLogger logger = new ADLLogger(InternalADLProjectDebugConfig.Settings, "UnitTest"); //Flag is required to find tags made up of unique masks(example: 2|8) Debug.PrefixLookupMode = PrefixLookupSettings.AddPrefixIfAvailable; logger.SetAllPrefixes("Hello", "HELLO1", "HOLA2"); Assert.True(logger.GetAllPrefixes().Count == 3); logger.RemoveAllPrefixes(); logger.SetAllPrefixes("Hello", "HELLO1", "HOLA2"); Assert.True(logger.GetAllPrefixes().Count == 3); }
public void ADL_Debug_AddPrefixForMask_Test() { //Flag is required to find tags made up of unique masks(example: 2|8) Debug.PrefixLookupMode = PrefixLookupSettings.AddPrefixIfAvailable | PrefixLookupSettings.DeconstructMaskToFind; ADLLogger logger = new ADLLogger(InternalADLProjectDebugConfig.Settings, "UnitTest"); BitMask bm = new BitMask(2 | 8); logger.AddPrefixForMask(bm | 4, "Test"); logger.AddPrefixForMask(bm | 4, "Test"); logger.RemoveAllPrefixes(); logger.AddPrefixForMask(bm, "HELLO"); bool ret = logger.GetMaskPrefix(bm) == "HELLO"; Assert.True(ret); }
public void ADL_Debug_GetAllPrefixes_Test() { ADLLogger logger = new ADLLogger("UnitTest"); //Flag is required to find tags made up of unique masks(example: 2|8) Debug.PrefixLookupMode = PrefixLookupSettings.Addprefixifavailable; logger.SetAllPrefixes("Hello", "HELLO1", "HOLA2"); Assert.True(logger.GetAllPrefixes().Count == 3); logger.RemoveAllPrefixes(); Debug.AdlEnabled = false; logger.SetAllPrefixes("Hello", "HELLO1", "HOLA2"); Assert.True(logger.GetAllPrefixes().Count == 3); Debug.AdlEnabled = true; }
public void ADL_Debug_AddPrefixForMask_Test() { //Flag is required to find tags made up of unique masks(example: 2|8) Debug.PrefixLookupMode = PrefixLookupSettings.Addprefixifavailable | PrefixLookupSettings.Deconstructmasktofind; ADLLogger logger = new ADLLogger("UnitTest"); BitMask bm = new BitMask(2 | 8); Debug.AdlEnabled = false; logger.AddPrefixForMask(bm | 4, "Test"); logger.AddPrefixForMask(bm | 4, "Test"); logger.RemoveAllPrefixes(); logger.AddPrefixForMask(bm, "HELLO"); Debug.AdlEnabled = true; bool ret = logger.GetMaskPrefix(bm) == "HELLO"; Assert.True(ret); }