Esempio n. 1
0
        public void Should_SerializeToJson_ForStandardInput()
        {
            //arrange
            int dimensions = 2;
            IJsonSerializationProvider jsonSerializationProvider = A.Fake <IJsonSerializationProvider>();
            IMatrixProvider            matrixProvider            = new MatrixProvider(jsonSerializationProvider, dimensions);

            //act
            matrixProvider.SerializeToJson();

            //assert
            A.CallTo(() => jsonSerializationProvider.Serialize(null)).WithAnyArguments().MustHaveHappened();
        }
Esempio n. 2
0
 /// <inheritdoc />
 public string SerializeToJson()
 {
     return(_jsonSerializationProvider.Serialize(_sparseMatrix.ToColumnArrays()));
 }