public void TestJsonParsing() { MixGroup group = new MixGroup() { Id = "1234", Name = "Metal" }; JObject json = JObject.Parse("{\"id\":\"1234\",\"name\":\"Metal\"}"); MixGroup fromJson = MixGroup.FromJToken(json) as MixGroup; Assert.IsNotNull(fromJson, "Expected a MixGroup object"); Assert.IsTrue(group.Equals(fromJson), "Expected the same MixGroup"); }
public void TestOverrides() { MixGroup group = new MixGroup() { Id = TestId, Name = TestName }; Assert.IsNotNull(group.GetHashCode(), "Expected a hash code"); Assert.IsFalse(group.Equals(TestId), "Expected inequality"); }