Пример #1
0
        public When_deserializing_ChargeState_with_minimal_data_Should_default(ITestOutputHelper output)
        {
            _json = SampleJson.ChargeStateMinimal;
            _sut  = _json.ToObject <ChargeState>();

            output.WriteLine("Serialized JSON:" + Environment.NewLine + _json);
        }
Пример #2
0
        public ChargeState_Should_calculate(ITestOutputHelper output)
        {
            JObject json = SampleJson.ChargeState;

            _sut = json.ToObject <ChargeState>();

            output.WriteLine("Serialized JSON:" + Environment.NewLine + json);
        }
Пример #3
0
        public When_deserializing_ChargeState_Should_deserialize(ITestOutputHelper output)
            : base(output)
        {
            _json = SampleJson.ChargeState;
            _sut  = _json.ToObject <ChargeState>();

            output.WriteLine("Serialized JSON:" + Environment.NewLine + _json);
        }
Пример #4
0
        public When_serializing_ChargeState_Should_serialize(ITestOutputHelper output)
            : base(output)
        {
            _sut  = Fixture.Create <ChargeState>();
            _json = JObject.FromObject(_sut);

            output.WriteLine("Serialized JSON:" + Environment.NewLine + _json);
        }
        public When_deserializing_GetChargeStateResponse_Should_deserialize(ITestOutputHelper output)
            : base(output)
        {
            _json             = SampleJson.GetChargeStateResponse;
            _sut              = _json.ToObject <ResponseDataWrapper <ChargeState> >();
            _expectedResponse = SampleJson.ChargeState.ToObject <ChargeState>();

            output.WriteLine("Serialized JSON:" + Environment.NewLine + _json);
        }
Пример #6
0
        public When_serializing_and_deserializing_ChargeState(ITestOutputHelper output)
            : base(output)
        {
            _expected = Fixture.Create <ChargeState>();
            JObject json = JObject.FromObject(_expected);

            output.WriteLine("Serialized JSON:" + Environment.NewLine + json);

            _actual = json.ToObject <ChargeState>();
        }
Пример #7
0
 public When_running_in_the_debugger_ChargeState_Should(ITestOutputHelper output)
     : base(output)
 {
     _sut = Fixture.Create <ChargeState>();
     GetDebuggerDisplay(_sut);
 }