public void UnionTest1() { var efi = new EnumFlagIndexer <GenericUriParserOptions>(GenericUriParserOptions.Idn); efi.Union(new[] { GenericUriParserOptions.IriParsing, GenericUriParserOptions.NoPort }); Assert.That(efi.Equals(GenericUriParserOptions.Idn | GenericUriParserOptions.NoPort | GenericUriParserOptions.IriParsing), Is.True); efi.Union(new[] { GenericUriParserOptions.Idn, GenericUriParserOptions.NoPort }); Assert.That(efi.Equals(GenericUriParserOptions.Idn | GenericUriParserOptions.NoPort | GenericUriParserOptions.IriParsing), Is.True); }
public void UnionTest() { var efi = new EnumFlagIndexer <GenericUriParserOptions>(GenericUriParserOptions.Idn); efi.Union(GenericUriParserOptions.NoPort); Assert.That(efi.Equals(GenericUriParserOptions.Idn | GenericUriParserOptions.NoPort), Is.True); efi.Union(GenericUriParserOptions.NoPort); Assert.That(efi.Equals(GenericUriParserOptions.Idn | GenericUriParserOptions.NoPort), Is.True); }
public void EqualsTest() { var efi = new EnumFlagIndexer <GenericUriParserOptions>(GenericUriParserOptions.Idn); Assert.That(efi.Equals(new EnumFlagIndexer <GenericUriParserOptions>(GenericUriParserOptions.Idn)), Is.True); Assert.That(efi == new EnumFlagIndexer <GenericUriParserOptions>(GenericUriParserOptions.Idn), Is.True); Assert.That(efi.Equals(GenericUriParserOptions.Idn), Is.True); Assert.That(efi == GenericUriParserOptions.Idn, Is.True); Assert.That(efi != GenericUriParserOptions.IriParsing, Is.True); Assert.That(efi.Equals(new EnumFlagIndexer <GenericUriParserOptions>(GenericUriParserOptions.IriParsing)), Is.False); Assert.That(efi.Equals(new EnumFlagIndexer <GenericUriParserOptions>(GenericUriParserOptions.IriParsing)), Is.False); Assert.That(efi.Equals(GenericUriParserOptions.IriParsing), Is.False); Assert.That(efi.Equals(512), Is.False); Assert.That(efi.Equals("512"), Is.False); }