public void AddPiFalse() { var currentPi = new NewPI(); currentPi.ClassroomName = "H.4.103"; currentPi.MacAdress = "103:103"; var result = _manage.AddPi(currentPi); var expected = JObject.Parse(@"{'Succeed':false}"); Assert.Equal(expected.ToString(), result.ToString()); }
public JObject AddPI([FromBody] JObject newPi) { LogUrl(); var pi = _jsonEditor.GetPi(newPi); var sendBack = _manage.AddPi(pi); return(sendBack); }