Two different styles of testing a custom JSON schema generator
up vote
3
down vote
favorite
I'm a junior programmer, and I've only been in the industry a couple of months.
One of the aspects that I struggle with most is testing my code. I can write tests, and I can ensure that my code passes the tests successfully. However the issues I have relates to whether or not I am doing my testing correctly. At the moment my testing strategy seems to consist of checking that anything that can go wrong with my code doesn't actually go wrong. So I end up testing for many different eventualities e.g. input is valid, input is null, input is incorrect etc.
Today one of my mentors showed me his style of testing, which consists of BDD oriented testing. Although I can see where the advantages lies, I feel like that with his style of testing I am writing a lot more code to cover the same area.
Today I've written a number of tests in both my normal style and the BDD style. I'd really appreciate it if someone could have a look through two of my test classes and tell me which is the more effective testing style, and if I should ditch the way I usually test.
This code is testing a custom built JSON schema generator. First a JSON file is fed into the program and a JSON schema document is created. Below one of the classes that is used in the program SchemaDefinitionPropertyFactory
is being tested to ensure correct functionality. For more information please see here: https://json-schema.org/understanding-json-schema/structuring.html
My style of testing:
private Question _question;
private SchemaDefinitionPropertyFactory _factory;
[SetUp]
public void Setup()
{
_question = new Question
{
Id = 1,
Text = "Question 1",
Type = "text",
Required = "1",
Valid_answers = null,
Conditional_question_id = null,
Conditional_question_answered = null,
Fk_section_id = "1"
};
_factory = new SchemaDefinitionPropertyFactory();
}
[Test]
public void BuildPropertiesList_ValidQuestionInput_ReturnsCorrectListOfPropertyFieldsAndOnlyOneSchemaPropertyInList()
{
List<SchemaProperty> propertyList = _factory.BuildPropertiesList(_question);
List <SchemaPropertyField> propertyFields = propertyList[0].PropertyFields;
Assert.That(propertyFields.Count, Is.EqualTo(2));
Assert.That(propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(propertyFields[0].Value, Is.EqualTo("string"));
Assert.That(propertyFields[1].Name, Is.EqualTo("minLength"));
Assert.That(propertyFields[1].Value, Is.EqualTo("1"));
Assert.That(propertyList.Count, Is.EqualTo(1));
}
[Test]
public void BuildPropertiesList_NonRequiredQuestion_PropertyDoesNotHaveMinimumLength()
{
_question.Required = "0";
List<SchemaProperty> propertyList = _factory.BuildPropertiesList(_question);
List<SchemaPropertyField> propertyFields = propertyList[0].PropertyFields;
Assert.That(propertyFields.Count, Is.EqualTo(1));
Assert.That(propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(propertyFields[0].Value, Is.EqualTo("string"));
}
BDD Testing style
private List<SchemaProperty> _propertyList;
private List<SchemaPropertyField> _propertyFields;
private Question _question;
protected override void GivenThat()
{
ClassUnderTest = new SchemaDefinitionPropertyFactory();
_question = new Question
{
Id = 1,
Text = "Question 1",
Type = "text",
Required = "1",
Valid_answers = null,
Conditional_question_id = null,
Conditional_question_answered = null,
Fk_section_id = "1"
};
}
protected override void When()
{
_propertyList = ClassUnderTest.BuildPropertiesList(_question);
_propertyFields = _propertyList[0].PropertyFields;
}
[Then]
public void ReturnsCorrectListOfPropertyFields()
{
Assert.That(_propertyFields.Count, Is.EqualTo(2));
Assert.That(_propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(_propertyFields[0].Value, Is.EqualTo("string"));
Assert.That(_propertyFields[1].Name, Is.EqualTo("minLength"));
Assert.That(_propertyFields[1].Value, Is.EqualTo("1"));
}
[Then]
public void ThereIsOnlyOneSchemaPropertyInList()
{
Assert.That(_propertyList.Count, Is.EqualTo(1));
}
[Then]
public void PropertyDoesNotHaveInvalidFields()
{
Assert.That(_propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(_propertyFields[0].Value, Is.EqualTo("string"));
}
c# unit-testing comparative-review
New contributor
add a comment |
up vote
3
down vote
favorite
I'm a junior programmer, and I've only been in the industry a couple of months.
One of the aspects that I struggle with most is testing my code. I can write tests, and I can ensure that my code passes the tests successfully. However the issues I have relates to whether or not I am doing my testing correctly. At the moment my testing strategy seems to consist of checking that anything that can go wrong with my code doesn't actually go wrong. So I end up testing for many different eventualities e.g. input is valid, input is null, input is incorrect etc.
Today one of my mentors showed me his style of testing, which consists of BDD oriented testing. Although I can see where the advantages lies, I feel like that with his style of testing I am writing a lot more code to cover the same area.
Today I've written a number of tests in both my normal style and the BDD style. I'd really appreciate it if someone could have a look through two of my test classes and tell me which is the more effective testing style, and if I should ditch the way I usually test.
This code is testing a custom built JSON schema generator. First a JSON file is fed into the program and a JSON schema document is created. Below one of the classes that is used in the program SchemaDefinitionPropertyFactory
is being tested to ensure correct functionality. For more information please see here: https://json-schema.org/understanding-json-schema/structuring.html
My style of testing:
private Question _question;
private SchemaDefinitionPropertyFactory _factory;
[SetUp]
public void Setup()
{
_question = new Question
{
Id = 1,
Text = "Question 1",
Type = "text",
Required = "1",
Valid_answers = null,
Conditional_question_id = null,
Conditional_question_answered = null,
Fk_section_id = "1"
};
_factory = new SchemaDefinitionPropertyFactory();
}
[Test]
public void BuildPropertiesList_ValidQuestionInput_ReturnsCorrectListOfPropertyFieldsAndOnlyOneSchemaPropertyInList()
{
List<SchemaProperty> propertyList = _factory.BuildPropertiesList(_question);
List <SchemaPropertyField> propertyFields = propertyList[0].PropertyFields;
Assert.That(propertyFields.Count, Is.EqualTo(2));
Assert.That(propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(propertyFields[0].Value, Is.EqualTo("string"));
Assert.That(propertyFields[1].Name, Is.EqualTo("minLength"));
Assert.That(propertyFields[1].Value, Is.EqualTo("1"));
Assert.That(propertyList.Count, Is.EqualTo(1));
}
[Test]
public void BuildPropertiesList_NonRequiredQuestion_PropertyDoesNotHaveMinimumLength()
{
_question.Required = "0";
List<SchemaProperty> propertyList = _factory.BuildPropertiesList(_question);
List<SchemaPropertyField> propertyFields = propertyList[0].PropertyFields;
Assert.That(propertyFields.Count, Is.EqualTo(1));
Assert.That(propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(propertyFields[0].Value, Is.EqualTo("string"));
}
BDD Testing style
private List<SchemaProperty> _propertyList;
private List<SchemaPropertyField> _propertyFields;
private Question _question;
protected override void GivenThat()
{
ClassUnderTest = new SchemaDefinitionPropertyFactory();
_question = new Question
{
Id = 1,
Text = "Question 1",
Type = "text",
Required = "1",
Valid_answers = null,
Conditional_question_id = null,
Conditional_question_answered = null,
Fk_section_id = "1"
};
}
protected override void When()
{
_propertyList = ClassUnderTest.BuildPropertiesList(_question);
_propertyFields = _propertyList[0].PropertyFields;
}
[Then]
public void ReturnsCorrectListOfPropertyFields()
{
Assert.That(_propertyFields.Count, Is.EqualTo(2));
Assert.That(_propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(_propertyFields[0].Value, Is.EqualTo("string"));
Assert.That(_propertyFields[1].Name, Is.EqualTo("minLength"));
Assert.That(_propertyFields[1].Value, Is.EqualTo("1"));
}
[Then]
public void ThereIsOnlyOneSchemaPropertyInList()
{
Assert.That(_propertyList.Count, Is.EqualTo(1));
}
[Then]
public void PropertyDoesNotHaveInvalidFields()
{
Assert.That(_propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(_propertyFields[0].Value, Is.EqualTo("string"));
}
c# unit-testing comparative-review
New contributor
1
The first thing that you need to do on on Code Review is to explain what your code is doing so please edit your question and describe what you are testing. Then I think it should be fine. It'd be also beneficial for your question if you added the complete test-class and of course the code you are testing.
– t3chb0t
Nov 14 at 16:26
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I'm a junior programmer, and I've only been in the industry a couple of months.
One of the aspects that I struggle with most is testing my code. I can write tests, and I can ensure that my code passes the tests successfully. However the issues I have relates to whether or not I am doing my testing correctly. At the moment my testing strategy seems to consist of checking that anything that can go wrong with my code doesn't actually go wrong. So I end up testing for many different eventualities e.g. input is valid, input is null, input is incorrect etc.
Today one of my mentors showed me his style of testing, which consists of BDD oriented testing. Although I can see where the advantages lies, I feel like that with his style of testing I am writing a lot more code to cover the same area.
Today I've written a number of tests in both my normal style and the BDD style. I'd really appreciate it if someone could have a look through two of my test classes and tell me which is the more effective testing style, and if I should ditch the way I usually test.
This code is testing a custom built JSON schema generator. First a JSON file is fed into the program and a JSON schema document is created. Below one of the classes that is used in the program SchemaDefinitionPropertyFactory
is being tested to ensure correct functionality. For more information please see here: https://json-schema.org/understanding-json-schema/structuring.html
My style of testing:
private Question _question;
private SchemaDefinitionPropertyFactory _factory;
[SetUp]
public void Setup()
{
_question = new Question
{
Id = 1,
Text = "Question 1",
Type = "text",
Required = "1",
Valid_answers = null,
Conditional_question_id = null,
Conditional_question_answered = null,
Fk_section_id = "1"
};
_factory = new SchemaDefinitionPropertyFactory();
}
[Test]
public void BuildPropertiesList_ValidQuestionInput_ReturnsCorrectListOfPropertyFieldsAndOnlyOneSchemaPropertyInList()
{
List<SchemaProperty> propertyList = _factory.BuildPropertiesList(_question);
List <SchemaPropertyField> propertyFields = propertyList[0].PropertyFields;
Assert.That(propertyFields.Count, Is.EqualTo(2));
Assert.That(propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(propertyFields[0].Value, Is.EqualTo("string"));
Assert.That(propertyFields[1].Name, Is.EqualTo("minLength"));
Assert.That(propertyFields[1].Value, Is.EqualTo("1"));
Assert.That(propertyList.Count, Is.EqualTo(1));
}
[Test]
public void BuildPropertiesList_NonRequiredQuestion_PropertyDoesNotHaveMinimumLength()
{
_question.Required = "0";
List<SchemaProperty> propertyList = _factory.BuildPropertiesList(_question);
List<SchemaPropertyField> propertyFields = propertyList[0].PropertyFields;
Assert.That(propertyFields.Count, Is.EqualTo(1));
Assert.That(propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(propertyFields[0].Value, Is.EqualTo("string"));
}
BDD Testing style
private List<SchemaProperty> _propertyList;
private List<SchemaPropertyField> _propertyFields;
private Question _question;
protected override void GivenThat()
{
ClassUnderTest = new SchemaDefinitionPropertyFactory();
_question = new Question
{
Id = 1,
Text = "Question 1",
Type = "text",
Required = "1",
Valid_answers = null,
Conditional_question_id = null,
Conditional_question_answered = null,
Fk_section_id = "1"
};
}
protected override void When()
{
_propertyList = ClassUnderTest.BuildPropertiesList(_question);
_propertyFields = _propertyList[0].PropertyFields;
}
[Then]
public void ReturnsCorrectListOfPropertyFields()
{
Assert.That(_propertyFields.Count, Is.EqualTo(2));
Assert.That(_propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(_propertyFields[0].Value, Is.EqualTo("string"));
Assert.That(_propertyFields[1].Name, Is.EqualTo("minLength"));
Assert.That(_propertyFields[1].Value, Is.EqualTo("1"));
}
[Then]
public void ThereIsOnlyOneSchemaPropertyInList()
{
Assert.That(_propertyList.Count, Is.EqualTo(1));
}
[Then]
public void PropertyDoesNotHaveInvalidFields()
{
Assert.That(_propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(_propertyFields[0].Value, Is.EqualTo("string"));
}
c# unit-testing comparative-review
New contributor
I'm a junior programmer, and I've only been in the industry a couple of months.
One of the aspects that I struggle with most is testing my code. I can write tests, and I can ensure that my code passes the tests successfully. However the issues I have relates to whether or not I am doing my testing correctly. At the moment my testing strategy seems to consist of checking that anything that can go wrong with my code doesn't actually go wrong. So I end up testing for many different eventualities e.g. input is valid, input is null, input is incorrect etc.
Today one of my mentors showed me his style of testing, which consists of BDD oriented testing. Although I can see where the advantages lies, I feel like that with his style of testing I am writing a lot more code to cover the same area.
Today I've written a number of tests in both my normal style and the BDD style. I'd really appreciate it if someone could have a look through two of my test classes and tell me which is the more effective testing style, and if I should ditch the way I usually test.
This code is testing a custom built JSON schema generator. First a JSON file is fed into the program and a JSON schema document is created. Below one of the classes that is used in the program SchemaDefinitionPropertyFactory
is being tested to ensure correct functionality. For more information please see here: https://json-schema.org/understanding-json-schema/structuring.html
My style of testing:
private Question _question;
private SchemaDefinitionPropertyFactory _factory;
[SetUp]
public void Setup()
{
_question = new Question
{
Id = 1,
Text = "Question 1",
Type = "text",
Required = "1",
Valid_answers = null,
Conditional_question_id = null,
Conditional_question_answered = null,
Fk_section_id = "1"
};
_factory = new SchemaDefinitionPropertyFactory();
}
[Test]
public void BuildPropertiesList_ValidQuestionInput_ReturnsCorrectListOfPropertyFieldsAndOnlyOneSchemaPropertyInList()
{
List<SchemaProperty> propertyList = _factory.BuildPropertiesList(_question);
List <SchemaPropertyField> propertyFields = propertyList[0].PropertyFields;
Assert.That(propertyFields.Count, Is.EqualTo(2));
Assert.That(propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(propertyFields[0].Value, Is.EqualTo("string"));
Assert.That(propertyFields[1].Name, Is.EqualTo("minLength"));
Assert.That(propertyFields[1].Value, Is.EqualTo("1"));
Assert.That(propertyList.Count, Is.EqualTo(1));
}
[Test]
public void BuildPropertiesList_NonRequiredQuestion_PropertyDoesNotHaveMinimumLength()
{
_question.Required = "0";
List<SchemaProperty> propertyList = _factory.BuildPropertiesList(_question);
List<SchemaPropertyField> propertyFields = propertyList[0].PropertyFields;
Assert.That(propertyFields.Count, Is.EqualTo(1));
Assert.That(propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(propertyFields[0].Value, Is.EqualTo("string"));
}
BDD Testing style
private List<SchemaProperty> _propertyList;
private List<SchemaPropertyField> _propertyFields;
private Question _question;
protected override void GivenThat()
{
ClassUnderTest = new SchemaDefinitionPropertyFactory();
_question = new Question
{
Id = 1,
Text = "Question 1",
Type = "text",
Required = "1",
Valid_answers = null,
Conditional_question_id = null,
Conditional_question_answered = null,
Fk_section_id = "1"
};
}
protected override void When()
{
_propertyList = ClassUnderTest.BuildPropertiesList(_question);
_propertyFields = _propertyList[0].PropertyFields;
}
[Then]
public void ReturnsCorrectListOfPropertyFields()
{
Assert.That(_propertyFields.Count, Is.EqualTo(2));
Assert.That(_propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(_propertyFields[0].Value, Is.EqualTo("string"));
Assert.That(_propertyFields[1].Name, Is.EqualTo("minLength"));
Assert.That(_propertyFields[1].Value, Is.EqualTo("1"));
}
[Then]
public void ThereIsOnlyOneSchemaPropertyInList()
{
Assert.That(_propertyList.Count, Is.EqualTo(1));
}
[Then]
public void PropertyDoesNotHaveInvalidFields()
{
Assert.That(_propertyFields[0].Name, Is.EqualTo("type"));
Assert.That(_propertyFields[0].Value, Is.EqualTo("string"));
}
c# unit-testing comparative-review
c# unit-testing comparative-review
New contributor
New contributor
edited Nov 14 at 16:31
t3chb0t
33.6k744108
33.6k744108
New contributor
asked Nov 14 at 16:08
Jake12342134
162
162
New contributor
New contributor
1
The first thing that you need to do on on Code Review is to explain what your code is doing so please edit your question and describe what you are testing. Then I think it should be fine. It'd be also beneficial for your question if you added the complete test-class and of course the code you are testing.
– t3chb0t
Nov 14 at 16:26
add a comment |
1
The first thing that you need to do on on Code Review is to explain what your code is doing so please edit your question and describe what you are testing. Then I think it should be fine. It'd be also beneficial for your question if you added the complete test-class and of course the code you are testing.
– t3chb0t
Nov 14 at 16:26
1
1
The first thing that you need to do on on Code Review is to explain what your code is doing so please edit your question and describe what you are testing. Then I think it should be fine. It'd be also beneficial for your question if you added the complete test-class and of course the code you are testing.
– t3chb0t
Nov 14 at 16:26
The first thing that you need to do on on Code Review is to explain what your code is doing so please edit your question and describe what you are testing. Then I think it should be fine. It'd be also beneficial for your question if you added the complete test-class and of course the code you are testing.
– t3chb0t
Nov 14 at 16:26
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
Your style of testing
I myself was using your style for a long time... until after several weeks I couldn't make any sense of them anymore. They are testing something, yes, but what and why? Nobody could say that anymore and especially when I wanted to know whether I tested a particular feature there was no way I could tell that.
Your client/customer/someone will tell you that something doesn't work... but all you see are properties and methods... now try to connect this with the broken feature.
BDD style
(This is my favourite.)
The BDD
style on the contrary clearly shows you what you are testing so even after a couple of weeks you'll still be able to understand them. You don't want to know the input data from the test name. You want to take a quick look at the list and be able to tell what your code is capabale of.
You don't what to know the APIs you are testing from the test name. This doesn't help. They might seem obvious now when everything is fresh but in a couple of weeks you'll forget the most of it (if you're working on several projects). The only thing you'll be able to identify are the features and if you cannot find them quickly, you'll end up debugging your code and studying it from the beginning. This is a pain...
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Your style of testing
I myself was using your style for a long time... until after several weeks I couldn't make any sense of them anymore. They are testing something, yes, but what and why? Nobody could say that anymore and especially when I wanted to know whether I tested a particular feature there was no way I could tell that.
Your client/customer/someone will tell you that something doesn't work... but all you see are properties and methods... now try to connect this with the broken feature.
BDD style
(This is my favourite.)
The BDD
style on the contrary clearly shows you what you are testing so even after a couple of weeks you'll still be able to understand them. You don't want to know the input data from the test name. You want to take a quick look at the list and be able to tell what your code is capabale of.
You don't what to know the APIs you are testing from the test name. This doesn't help. They might seem obvious now when everything is fresh but in a couple of weeks you'll forget the most of it (if you're working on several projects). The only thing you'll be able to identify are the features and if you cannot find them quickly, you'll end up debugging your code and studying it from the beginning. This is a pain...
add a comment |
up vote
1
down vote
Your style of testing
I myself was using your style for a long time... until after several weeks I couldn't make any sense of them anymore. They are testing something, yes, but what and why? Nobody could say that anymore and especially when I wanted to know whether I tested a particular feature there was no way I could tell that.
Your client/customer/someone will tell you that something doesn't work... but all you see are properties and methods... now try to connect this with the broken feature.
BDD style
(This is my favourite.)
The BDD
style on the contrary clearly shows you what you are testing so even after a couple of weeks you'll still be able to understand them. You don't want to know the input data from the test name. You want to take a quick look at the list and be able to tell what your code is capabale of.
You don't what to know the APIs you are testing from the test name. This doesn't help. They might seem obvious now when everything is fresh but in a couple of weeks you'll forget the most of it (if you're working on several projects). The only thing you'll be able to identify are the features and if you cannot find them quickly, you'll end up debugging your code and studying it from the beginning. This is a pain...
add a comment |
up vote
1
down vote
up vote
1
down vote
Your style of testing
I myself was using your style for a long time... until after several weeks I couldn't make any sense of them anymore. They are testing something, yes, but what and why? Nobody could say that anymore and especially when I wanted to know whether I tested a particular feature there was no way I could tell that.
Your client/customer/someone will tell you that something doesn't work... but all you see are properties and methods... now try to connect this with the broken feature.
BDD style
(This is my favourite.)
The BDD
style on the contrary clearly shows you what you are testing so even after a couple of weeks you'll still be able to understand them. You don't want to know the input data from the test name. You want to take a quick look at the list and be able to tell what your code is capabale of.
You don't what to know the APIs you are testing from the test name. This doesn't help. They might seem obvious now when everything is fresh but in a couple of weeks you'll forget the most of it (if you're working on several projects). The only thing you'll be able to identify are the features and if you cannot find them quickly, you'll end up debugging your code and studying it from the beginning. This is a pain...
Your style of testing
I myself was using your style for a long time... until after several weeks I couldn't make any sense of them anymore. They are testing something, yes, but what and why? Nobody could say that anymore and especially when I wanted to know whether I tested a particular feature there was no way I could tell that.
Your client/customer/someone will tell you that something doesn't work... but all you see are properties and methods... now try to connect this with the broken feature.
BDD style
(This is my favourite.)
The BDD
style on the contrary clearly shows you what you are testing so even after a couple of weeks you'll still be able to understand them. You don't want to know the input data from the test name. You want to take a quick look at the list and be able to tell what your code is capabale of.
You don't what to know the APIs you are testing from the test name. This doesn't help. They might seem obvious now when everything is fresh but in a couple of weeks you'll forget the most of it (if you're working on several projects). The only thing you'll be able to identify are the features and if you cannot find them quickly, you'll end up debugging your code and studying it from the beginning. This is a pain...
answered Nov 14 at 16:56
t3chb0t
33.6k744108
33.6k744108
add a comment |
add a comment |
Jake12342134 is a new contributor. Be nice, and check out our Code of Conduct.
Jake12342134 is a new contributor. Be nice, and check out our Code of Conduct.
Jake12342134 is a new contributor. Be nice, and check out our Code of Conduct.
Jake12342134 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f207663%2ftwo-different-styles-of-testing-a-custom-json-schema-generator%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
The first thing that you need to do on on Code Review is to explain what your code is doing so please edit your question and describe what you are testing. Then I think it should be fine. It'd be also beneficial for your question if you added the complete test-class and of course the code you are testing.
– t3chb0t
Nov 14 at 16:26