public void BindToName_NullDefaults() { var b = new TrackAllBindToTypes(); string assemblyName, typeName; b.BindToName(typeof(string), out assemblyName, out typeName); Assert.Null(assemblyName); Assert.Null(typeName); }
public void BindToType_AllValuesTracked() { var s = new MemoryStream(); var f = new BinaryFormatter(); f.Serialize(s, DayOfWeek.Monday); s.Position = 0; var t = new TrackAllBindToTypes(); f.Binder = t; f.Deserialize(s); Assert.Contains(t.Binds, kvp => kvp.Value.Contains("System.DayOfWeek")); }