public void Test_FourCharacterCode_Value() { var fcc = new FourCharacterCode("ABCD"); fcc.Value.Should().Be("ABCD"); fcc.ToString().Should().Be("ABCD"); }
public virtual Type LookupChunkObjectType(FourCharacterCode chunkTypeId) { Check.IfArgumentNull(chunkTypeId, "chunkTypeId"); string chunkId = chunkTypeId.ToString(); if (!chunkId.HasWildcard()) { Type result = null; // try fast lookup first if the requested type has no wildcards if (this.chunkMap.TryGetValue(chunkId, out result)) { return(result); } } // now match wildcards foreach (var item in this.chunkMap) { if (chunkId.MatchesWith(item.Key)) { return(item.Value); } } return(null); }
public void Test_FourCharacterCode_Value() { FourCharacterCode fcc = new FourCharacterCode(); fcc.Value = "ABCD"; Assert.AreEqual("ABCD", fcc.Value); Assert.AreEqual("ABCD", fcc.ToString()); }
public void Test_FourCharacterCode_ConstructChars() { FourCharacterCode fcc = new FourCharacterCode('A', 'B', 'C', 'D'); Assert.AreEqual("ABCD", fcc.ToString()); }
public void Test_FourCharacterCode_ConstructString() { FourCharacterCode fcc = new FourCharacterCode("ABCD"); Assert.AreEqual("ABCD", fcc.ToString()); }
public void Test_FourCharacterCode_ConstructString() { var fcc = new FourCharacterCode("ABCD"); fcc.ToString().Should().Be("ABCD"); }