public void GetHour() { var currentHour = JObject.Parse( @"{ 'Username':'******', 'Type':'Theorie', 'Classroom':'Room', 'Week':'22', 'StartHour':'3', 'TotalHours':'2', 'Day':'Friday', 'Year':'2018' }" ); var result = _json.GetNewHour(currentHour); var expected = new NewHour(); expected.Username = "******"; expected.Type = "Theorie"; expected.Classroom = "Room"; expected.Week = 22; expected.StartHour = 3; expected.TotalHours = 2; expected.Day = "Friday"; expected.Year = 2018; Assert.Equal(expected.Username, result.Username); Assert.Equal(expected.Type, result.Type); Assert.Equal(expected.Classroom, result.Classroom); Assert.Equal(expected.Week, result.Week); Assert.Equal(expected.StartHour, result.StartHour); Assert.Equal(expected.TotalHours, result.TotalHours); Assert.Equal(expected.Day, result.Day); Assert.Equal(expected.Year, result.Year); }