protected bool Equals(DefinedByFile other) { if (ReferenceEquals(this, other)) { return(true); } return(string.Equals(MyString, other.MyString) && MyInt == other.MyInt); }
public void SchemaInFilePasses() { var json = new JsonObject { ["MyString"] = "some string", ["MyInt"] = 15 }; var expected = new DefinedByFile { MyString = "some string", MyInt = 15 }; Directory.SetCurrentDirectory(System.IO.Path.Combine(TestContext.CurrentContext.TestDirectory, "Files")); var actual = new JsonSerializer().Deserialize <DefinedByFile>(json); Assert.AreEqual(expected, actual); }